Inserting the pref_settings_general.xml-v29 file

Allows to load the different layout files for different SDK versions.
For SDK >= 29 pref_settings_general.xml-v29
This commit is contained in:
ErikWaegerle 2020-07-01 21:39:59 +02:00
parent 2af00fd31c
commit 68b402fff7
2 changed files with 103 additions and 13 deletions

View file

@ -0,0 +1,102 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="@string/pref_group_game">
<SwitchPreference android:id="@+id/pref_automatic_note_deletion"
android:key="pref_automatic_note_deletion"
android:title="@string/pref_automatic_note_deletion"
android:summary="@string/pref_automatic_note_deletion_summary"
android:defaultValue="true"/>
<SwitchPreference android:id="@+id/pref_timer_reset"
android:key="pref_timer_reset"
android:title="@string/pref_timer_reset"
android:summary="@string/pref_timer_reset_summary"
android:defaultValue="true" />
<SwitchPreference android:id="@+id/pref_keep_screen_on"
android:key="pref_keep_screen_on"
android:title="@string/pref_keep_screen_on"
android:summary="@string/pref_keep_screen_on_summary"
android:defaultValue="true"/>
<ListPreference
android:key="pref_symbols"
android:title="@string/pref_symbols"
android:defaultValue="Default"
android:entries="@array/pref_symbols_list_titles"
android:entryValues="@array/pref_symbols_list_values"
android:negativeButtonText="@null"
android:positiveButtonText="@null" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/pref_group_dark_theme">
<SwitchPreference android:id="@+id/pref_dark_theme"
android:key="pref_dark_mode_setting"
android:title="@string/pref_dark_mode"
android:summary="@string/pref_dark_mode_summary"
android:defaultValue="true"/>
<SwitchPreference android:id="@+id/pref_dark_theme_automatically_by_system"
android:key="pref_dark_mode_automatically_by_system"
android:title="@string/pref_dark_mode_automatically_by_system"
android:summary="Dark theme is adapted to settings of the OS"
android:defaultValue="true"/>
<SwitchPreference android:id="@+id/pref_dark_theme_automatically_by_battery"
android:key="pref_dark_mode_automatically_by_battery"
android:title="@string/pref_dark_mode_automatically_by_battery"
android:summary="adjusts Dark theme automatically according to battery status "
android:defaultValue="true"/>
</PreferenceCategory>
<PreferenceCategory android:title="@string/pref_group_highlight_selection">
<SwitchPreference android:id="@+id/pref_highlight_connected"
android:key="pref_highlight_connected"
android:title="@string/pref_highlight_connected"
android:summary=""
android:defaultValue="true"/>
</PreferenceCategory>
<PreferenceCategory android:title="@string/pref_group_highlight_value">
<SwitchPreference android:id="@+id/pref_highlight_vals"
android:key="pref_highlight_vals"
android:title="@string/pref_highlight_vals"
android:summary=""
android:defaultValue="true"/>
<SwitchPreference android:id="@+id/pref_highlight_notes"
android:key="pref_highlight_notes"
android:title="@string/pref_highlight_notes"
android:summary=""
android:defaultValue="true"/>
<SwitchPreference android:id="@+id/pref_highlightInputError"
android:key="pref_highlightInputError"
android:title="@string/pref_highlightInputError"
android:summary=""
android:defaultValue="true"/>
</PreferenceCategory>
<!-- NOTE: EditTextPreference accepts EditText attributes. -->
<!-- NOTE: EditTextPreference's summary should be set to its value by the activity code. -->
<!-- <EditTextPreference
android:key="example_text"
android:title="@string/pref_title_display_name"
android:defaultValue="@string/pref_default_display_name"
android:selectAllOnFocus="true"
android:inputType="textCapWords"
android:capitalize="words"
android:singleLine="true"
android:maxLines="1" /> -->
<!-- NOTE: Hide buttons to simplify the UI. Users can touch outside the dialog to
dismiss it. -->
<!-- NOTE: ListPreference's summary should be set to its value by the activity code. -->
<!-- <ListPreference
android:key="example_list"
android:title="@string/pref_title_add_friends_to_messages"
android:defaultValue="-1"
android:entries="@array/pref_example_list_titles"
android:entryValues="@array/pref_example_list_values"
android:negativeButtonText="@null"
android:positiveButtonText="@null" /> -->
</PreferenceScreen>

View file

@ -36,18 +36,6 @@
android:summary="@string/pref_dark_mode_summary" android:summary="@string/pref_dark_mode_summary"
android:defaultValue="true"/> android:defaultValue="true"/>
<SwitchPreference android:id="@+id/pref_dark_theme_automatically_by_system"
android:key="pref_dark_mode_automatically_by_system"
android:title="@string/pref_dark_mode_automatically_by_system"
android:summary="Dark theme is adapted to settings of the OS"
android:defaultValue="true"/>
<SwitchPreference android:id="@+id/pref_dark_theme_automatically_by_battery"
android:key="pref_dark_mode_automatically_by_battery"
android:title="@string/pref_dark_mode_automatically_by_battery"
android:summary="adjusts Dark theme automatically according to battery status "
android:defaultValue="true"/>
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory android:title="@string/pref_group_highlight_selection"> <PreferenceCategory android:title="@string/pref_group_highlight_selection">
@ -99,4 +87,4 @@
android:negativeButtonText="@null" android:negativeButtonText="@null"
android:positiveButtonText="@null" /> --> android:positiveButtonText="@null" /> -->
</PreferenceScreen> </PreferenceScreen>