Search code examples
androidandroid-layoutandroid-studio

How to enable "Extract String Resource" popup in Android Studio?


In Android Studio while adding TextView to the layout xml file, it is very convenient to use "Extract String Resource" to add string name to strings.xml. But somehow its not appearing in the popup whether I click or press Alt + Enter (Windows 8 OS).

Is there anything I need to get that popup back? Here is the screenshot of what the popup looks like now.

enter image description here


Solution

  • Preform the action when the attribute is the value you want the string to be, or a string reference that doesn't exist, for example:

    android:text="oh hi!"
    

    or

    android:text="@string/this_doesnt_exist_yet"