I have a fresh new install of Android Studio 3.1.4 I wish to add a PreferenceScreen to my app (I'm just following a tutorial to add Settings panel). I read the docs step by step and I'm coding accordingly but I cannot understand why Android Studio is not rendering the PreferenceScreen. This's the code of my PrefenceScreen:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<SwitchPreference
android:defaultValue="false"
android:key="switch_preference_1"
android:title="Switch preference" />
<EditTextPreference
android:defaultValue="Default value"
android:key="edit_text_preference_1"
android:selectAllOnFocus="true"
android:singleLine="true"
android:title="Edit text preference" />
</PreferenceScreen>
The layout preview is blank:
the preferences.xml file is located in \res\xml directory.
No errors/warning on build.