I am trying to extract style in android studio 0.8.9 using the refactor option. But it seems to be disabled for some reason. I have tried cleaning and rebuilding the project just in case and even restarting Android Studio, but nothing seems to enable the extract style option.
I had the same problem. Extracting styles is different in Android Studio:
You don’t need to select text and choose
Refactor->Extract->Style, just choose the menu option With no text selected.
So, just click anywhere inside the ImageView element (Do not select any text). The refactor option should become available.
Works fine for me without selecting any code. To extract layout you need to select the whole layout not just a part of it.