b1k*_*jsh 47 android intellij-idea android-studio
我知道这可以通过遵循以下建议在eclipse中实现:Android:resource String自动生成
但我似乎无法找到这在Android工作室是否可行.有人知道怎么做吗?
基本上我想采用硬编码字符串并在我的main values.xml或strings.xml中自动创建@string引用.
Cra*_*der 117
Alt+Enter, Extract String Resource while the caret is inside the hardcoded string:

The same should work in XML files as well, and it does work in IntelliJ IDEA, but seems to be broken in the current version of the Android Studio:

Android Studio 0.1.3 shows the folded text in XML layouts that it extracts from the string resources, but it fails to navigate back to the resource and doesn't offer to extract resources from the hardcoded strings inside XML. It appears to be a bug.
Mic*_*ick 21
上述答案中似乎缺少的是,在Android Studio中,您必须将光标放在字符串中,单击鼠标,然后按Alt + Enter以显示"提取字符串资源"对话框
| 归档时间: | 
 | 
| 查看次数: | 39771 次 | 
| 最近记录: |