我可以让 Eclipse 在编码时添加字符串资源吗?还是必须始终切换到 string.xml 并添加每个字符串?
Eclipse 会帮你做这件事。所以如果你有一个字段:
android:text="hello"
选择“hello”,然后转到 Refactor-->Android-->Extract Android String,Eclipse 会将行更改为:
android:text="@string/hello"
并将该行自动添加到 strings.xml 中,如下所示:
<string name="hello">Hello</string>
JAL
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)