mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
[android] Use Material switches in preference screens
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
This commit is contained in:
committed by
jeanbaptisteC
parent
3f7dc91b5b
commit
eaa56e5127
@@ -386,14 +386,6 @@
|
||||
<item name="android:textAllCaps">false</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmWidget.Preference">
|
||||
<item name="switchPreferenceCompatStyle">@style/MwmWidget.SwitchPreferenceCompat</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmWidget.SwitchPreferenceCompat" parent="Preference.SwitchPreferenceCompat.Material">
|
||||
<item name="android:widgetLayout">@layout/preference_switch</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmWidget.M3.Button" parent="Widget.Material3.Button">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
android:title="@string/pref_zoom_title"
|
||||
app:singleLineTitle="false"
|
||||
android:summary="@string/pref_zoom_summary"
|
||||
android:widgetLayout="@layout/preference_switch"
|
||||
android:order="2"/>
|
||||
<ListPreference
|
||||
android:key="@string/pref_left_button"
|
||||
@@ -40,12 +41,14 @@
|
||||
android:key="@string/pref_3d_buildings"
|
||||
android:title="@string/pref_map_3d_buildings_title"
|
||||
app:singleLineTitle="false"
|
||||
android:widgetLayout="@layout/preference_switch"
|
||||
android:order="4"/>
|
||||
<SwitchPreferenceCompat
|
||||
android:key="@string/pref_autodownload"
|
||||
android:title="@string/autodownload"
|
||||
app:icon="@drawable/ic_download_st"
|
||||
app:singleLineTitle="false"
|
||||
android:widgetLayout="@layout/preference_switch"
|
||||
android:order="5"/>
|
||||
<SwitchPreferenceCompat
|
||||
android:key="@string/pref_large_fonts_size"
|
||||
@@ -53,6 +56,7 @@
|
||||
app:singleLineTitle="false"
|
||||
android:defaultValue="false"
|
||||
app:icon="@drawable/ic_text_fields"
|
||||
android:widgetLayout="@layout/preference_switch"
|
||||
android:order="6"/>
|
||||
<Preference
|
||||
android:key="@string/pref_map_locale"
|
||||
@@ -67,6 +71,7 @@
|
||||
app:singleLineTitle="false"
|
||||
app:icon="@drawable/ic_translate_indic"
|
||||
android:defaultValue="false"
|
||||
android:widgetLayout="@layout/preference_switch"
|
||||
android:order="8"/>
|
||||
<Preference
|
||||
android:key="@string/pref_storage"
|
||||
@@ -90,6 +95,7 @@
|
||||
app:singleLineTitle="false"
|
||||
android:summary="@string/enable_logging_warning_message"
|
||||
android:defaultValue="false"
|
||||
android:widgetLayout="@layout/preference_switch"
|
||||
android:order="11"/>
|
||||
<SwitchPreferenceCompat
|
||||
android:key="@string/pref_emulate_bad_external_storage"
|
||||
@@ -97,6 +103,7 @@
|
||||
app:singleLineTitle="false"
|
||||
android:defaultValue="false"
|
||||
app:isPreferenceVisible="false"
|
||||
android:widgetLayout="@layout/preference_switch"
|
||||
android:order="12"/>
|
||||
</androidx.preference.PreferenceCategory>
|
||||
|
||||
@@ -109,11 +116,13 @@
|
||||
android:title="@string/pref_map_3d_title"
|
||||
app:icon="@drawable/ic_three_d_rotation"
|
||||
app:singleLineTitle="false"
|
||||
android:widgetLayout="@layout/preference_switch"
|
||||
android:order="1"/>
|
||||
<SwitchPreferenceCompat
|
||||
android:key="@string/pref_auto_zoom"
|
||||
android:title="@string/pref_map_auto_zoom"
|
||||
app:singleLineTitle="false"
|
||||
android:widgetLayout="@layout/preference_switch"
|
||||
android:order="2"/>
|
||||
<Preference
|
||||
android:key="@string/pref_tts_screen"
|
||||
@@ -170,6 +179,7 @@
|
||||
app:singleLineTitle="false"
|
||||
android:summary="@string/enable_keep_screen_on_description"
|
||||
android:defaultValue="false"
|
||||
android:widgetLayout="@layout/preference_switch"
|
||||
android:order="4"/>
|
||||
<SwitchPreferenceCompat
|
||||
android:key="@string/pref_show_on_lock_screen"
|
||||
@@ -178,6 +188,7 @@
|
||||
app:singleLineTitle="false"
|
||||
android:summary="@string/enable_show_on_lock_screen_description"
|
||||
android:defaultValue="true"
|
||||
android:widgetLayout="@layout/preference_switch"
|
||||
android:order="5"/>
|
||||
</PreferenceCategory>
|
||||
<androidx.preference.PreferenceCategory
|
||||
@@ -191,6 +202,7 @@
|
||||
app:icon="@drawable/ic_wifi_find"
|
||||
android:summary="@string/pref_use_google_play"
|
||||
android:defaultValue="true"
|
||||
android:widgetLayout="@layout/preference_switch"
|
||||
android:order="1"/>
|
||||
<SwitchPreferenceCompat
|
||||
android:key="@string/pref_search_history"
|
||||
@@ -198,6 +210,7 @@
|
||||
app:icon="@drawable/ic_search_recent_st"
|
||||
app:singleLineTitle="false"
|
||||
android:defaultValue="true"
|
||||
android:widgetLayout="@layout/preference_switch"
|
||||
android:order="2"/>
|
||||
</androidx.preference.PreferenceCategory>
|
||||
</androidx.preference.PreferenceScreen>
|
||||
|
||||
@@ -6,12 +6,14 @@
|
||||
<SwitchPreferenceCompat
|
||||
android:key="@string/pref_tts_enabled"
|
||||
android:title="@string/pref_tts_enable_title"
|
||||
android:widgetLayout="@layout/preference_switch"
|
||||
app:iconSpaceReserved="false"/>
|
||||
<SwitchPreferenceCompat
|
||||
android:key="@string/pref_tts_street_names"
|
||||
android:title="@string/pref_tts_street_names_title"
|
||||
app:isPreferenceVisible="false"
|
||||
android:summary="@string/pref_tts_street_names_description"
|
||||
android:widgetLayout="@layout/preference_switch"
|
||||
android:defaultValue="false"
|
||||
app:iconSpaceReserved="false"/>
|
||||
<ListPreference
|
||||
|
||||
Reference in New Issue
Block a user