Externalize strings for Android project

后端 未结 3 1139
旧巷少年郎
旧巷少年郎 2020-12-09 10:23

Is there any Eclipse plugin that takes strings from code and puts them in strings.xml? I found \"Externalize strings\" function in Eclipse, but I don\'t know how to get it t

3条回答
  •  攒了一身酷
    2020-12-09 11:12

    Use Refactor in Eclipse:

    • highlight the string
    • From the Eclipse menu select Refactor -> Android -> Extract Android String.

    The string will be moved to strings.xml and the call to getContext().getString(R.string.my_string) generated.

提交回复
热议问题