I am trying to add a summary to one of my list items. (Summary under 'Systemstandardeinstellung')
How can I do it? I haven't found any solution yet, the only thing I found was how to use to currently selected ListItem as the ListPreference summary.
This is what I have.:
preferences.xml
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<PreferenceCategory
android:key="basic_settings_category"
android:title="Grundeinstellungen"
app:iconSpaceReserved="false">
<ListPreference
android:defaultValue="0"
android:key="@string/theme_preferences_key"
android:title="Designs"
app:entries="@array/themes_entries"
app:entryValues="@array/themes_values"
app:iconSpaceReserved="false" />
<SwitchPreference
android:key="night_mode"
android:title="Nachtmodus"
app:iconSpaceReserved="false" />
</PreferenceCategory>
</PreferenceScreen>
theme_res.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="themes_entries">
<item>Systemstandardeinstellung</item>
<item>Hell</item>
<item>Dunkel</item>
</string-array>
<string-array name="themes_values">
<item>@string/system_theme_preference_value</item>
<item>@string/light_theme_preference_value</item>
<item>@string/dark_theme_preference_value</item>
</string-array>
</resources>
strings.xml
<resources>
<string name="app_name">TestApp</string>
<string name="settings">Settings</string>
<string name="openNavDrawer">Navigation Drawer Open</string>
<string name="closeNavDrawer">Navigation Drawer Close</string>
<string name="theme_preferences_key">theme_preferences_key</string>
<string name="notification_preferences_key"></string>
<string name="system_theme_preference_value">0</string>
<string name="light_theme_preference_value">1</string>
<string name="dark_theme_preference_value">2</string>
<string name="system_theme_description">Systemstandardeinstellung</string>
<string name="light_theme_description">Hell</string>
<string name="dark_theme_description">Dunkel</string>
</resources>
