Search code examples
androidintellij-ideaautomated-refactoring

Is there way for extracting string resources in Android project in IntelliJ IDE?


When I'm working on Android project I would like to use some magic shortcut that would extract my string to strings.xml and also allow me to change the key. Is there any?

If there isn't, is there a way to develop new refactorization methods and extend IntelliJ possibilities?


Solution

  • Alt+Enter (to invoke intention action menu) on a string, then use Add a string resource action from the menu.

    To rename resource use Refactor | Rename while standing on a resource name in Java code, it will rename all the references and the resource itself.