Normally when editing a preferences.xml
file in Android Studio, one can switch to the layout editor by clicking on the "Design" button at the lower left of the screen:
After clicking the button, the layout editor is shown for this xml file:
But when I change the PreferenceScreen
to android.support.v7.preference.PreferenceScreen
(as e.g. suggested here), the button disappears (it is necessary to re-open the xml file to see this effect):
- Is this behavior normal or is this just my Android Studio installation (v3.1.1 on Windows) - i.e. is the layout editor not yet implemented for v7 preference xml files?
- Is it somehow possible to open the layout editor when using v7 preferences anyway? Does a good workaround exist?
- It seems that not explicitly declaring the
android.support.v7.preference.PreferenceScreen
in the xml file does work nevertheless with v7 preferences, so somehow theandroid.preference.PreferenceScreen
gets converted to aandroid.support.v7.preference.PreferenceScreen
behind the scenes. Is there any downside when using v7 preferences and not explicitly declaringandroid.support.v7.preference.PreferenceScreen
in the xml file (so one can still use the layout editor)? What is the difference, if any (other than possible compiler warnings regarding not allowed xml-elements)?