Messaging: Style the SwitchPreferences

Use the newer style of A15

Change-Id: I75a0e54f70f837d21d3aaa746f2e0ec7af226eda
This commit is contained in:
Michael W
2024-12-26 15:54:35 +01:00
parent 1914db5ea4
commit 5ed268cee1
6 changed files with 33 additions and 8 deletions
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
SPDX-FileCopyrightText: 2023 The Android Open Source Project
SPDX-License-Identifier: Apache-2.0
-->
<com.google.android.material.materialswitch.MaterialSwitch
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/switchWidget"
android:theme="@style/Theme.Material3.DynamicColors.DayNight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:focusable="false" />
+10
View File
@@ -35,6 +35,7 @@
<item name="android:textColorHighlight">@color/text_highlight_color</item>
<item name="actionBarStyle">@style/BugleActionBar</item>
<item name="alertDialogTheme">@style/AlertDialogTheme</item>
<item name="preferenceTheme">@style/AppPreferenceThemeOverlay</item>
</style>
<style name="LaunchTheme" parent="Theme.AppCompat.DayNight.DarkActionBar">
@@ -638,4 +639,13 @@
<item name="android:background">@color/window_background</item>
<item name="dialogCornerRadius">28dp</item>
</style>
<style name="AppPreferenceThemeOverlay" parent="@style/PreferenceThemeOverlay">
<item name="switchPreferenceCompatStyle">@style/AppSwitchPreference</item>
</style>
<style name="AppSwitchPreference" parent="@style/Preference.SwitchPreferenceCompat.Material">
<item name="widgetLayout">@layout/preference_material_switch</item>
</style>
</resources>
+2 -2
View File
@@ -37,7 +37,7 @@
</intent>
</PreferenceScreen>
<CheckBoxPreference
<SwitchPreferenceCompat
android:key="@string/send_sound_pref_key"
android:title="@string/send_sound_pref_title"
android:defaultValue="@bool/send_sound_pref_default"
@@ -48,7 +48,7 @@
android:title="@string/notifications_pref_title"
android:persistent="true" />
<SwitchPreference
<SwitchPreferenceCompat
android:key="@string/swipe_right_deletes_conversation_key"
android:title="@string/swipe_to_delete_conversation_pref_title"
android:summary="@string/swipe_to_delete_conversation_pref_summary"
+3 -3
View File
@@ -30,13 +30,13 @@
android:key="@string/mms_phone_number_pref_key"
android:title="@string/mms_phone_number_pref_title" />
<CheckBoxPreference
<SwitchPreferenceCompat
android:key="@string/auto_retrieve_mms_pref_key"
android:title="@string/auto_retrieve_mms_pref_title"
android:summary="@string/auto_retrieve_mms_pref_summary"
android:defaultValue="@bool/auto_retrieve_mms_pref_default" />
<CheckBoxPreference
<SwitchPreferenceCompat
android:key="@string/auto_retrieve_mms_when_roaming_pref_key"
android:dependency="@string/auto_retrieve_mms_pref_key"
android:title="@string/auto_retrieve_mms_when_roaming_pref_title"
@@ -49,7 +49,7 @@
android:key="@string/advanced_category_pref_key"
android:title="@string/advanced_category_pref_title">
<CheckBoxPreference
<SwitchPreferenceCompat
android:key="@string/delivery_reports_pref_key"
android:title="@string/delivery_reports_pref_title"
android:summary="@string/delivery_reports_pref_summary"