我经常发现自己想要在布局文件中更改这样的内容:
android:layout_width="wrap_content"
到styles.xml
中的等效样式属性:
<item name="android:layout_width">wrap_content</item>
是否有Eclipse快捷方式?谷歌抛出了数以千计的无关结果。
答案 0 :(得分:6)
现在看来现在可以使用最新工具 - 有关详细信息,请参阅http://tools.android.com/recent/extractstylerefactoring
希望这有帮助,
Phil Lello
答案 1 :(得分:3)
澄清:
您可以在菜单中使用Eclipse构建 - &gt;重构 - &gt; Android - &gt;提取样式...(教程:http://www.jetbrains.com/idea/webhelp/refactoring-android-xml-layout-files.html)
使用这个简单的转换器:http://beadsoft.de/android/xmltostyleconverter.php