From ec8a994d546d2bce4b9039d16db15653c271ab63 Mon Sep 17 00:00:00 2001 From: Brian Isganitis Date: Wed, 9 Jun 2021 16:34:45 -0400 Subject: [PATCH] Update preferences to Material Next styling There should be enough free space to merge this change into S V2. Test: Settings root, all apps, and about have new style on S Bug: 187732263 Fix: 188254205, 188012913 Change-Id: I346bbf819f3fe1eb13b47125b53c15baab11e439 Merged-In: I346bbf819f3fe1eb13b47125b53c15baab11e439 --- Android.bp | 1 + AndroidManifest-common.xml | 2 +- .../home_settings_switch_thumb_color.xml | 27 ++++++ .../home_settings_switch_track_color.xml | 28 ++++++ .../home_settings_switch_thumb.xml | 29 ++++++ .../home_settings_switch_track.xml | 26 +++++ res/layout-v31/settings_activity.xml | 69 ++++++++++++++ res/values-night-v31/colors.xml | 27 ++++++ res/values-v31/colors.xml | 10 ++ res/values-v31/config.xml | 20 ++++ res/values-v31/styles.xml | 95 +++++++++++++++++++ res/values/styles.xml | 10 +- 12 files changed, 338 insertions(+), 6 deletions(-) create mode 100644 res/color-v31/home_settings_switch_thumb_color.xml create mode 100644 res/color-v31/home_settings_switch_track_color.xml create mode 100644 res/drawable-v31/home_settings_switch_thumb.xml create mode 100644 res/drawable-v31/home_settings_switch_track.xml create mode 100644 res/layout-v31/settings_activity.xml create mode 100644 res/values-night-v31/colors.xml create mode 100644 res/values-v31/config.xml create mode 100644 res/values-v31/styles.xml diff --git a/Android.bp b/Android.bp index 1b6ffe42b7..45d022f4fd 100644 --- a/Android.bp +++ b/Android.bp @@ -112,6 +112,7 @@ android_library { "androidx.preference_preference", "androidx.slice_slice-view", "androidx.cardview_cardview", + "com.google.android.material_material", "iconloader_base", ], manifest: "AndroidManifest-common.xml", diff --git a/AndroidManifest-common.xml b/AndroidManifest-common.xml index d725a16f80..4eecf29d67 100644 --- a/AndroidManifest-common.xml +++ b/AndroidManifest-common.xml @@ -144,7 +144,7 @@ diff --git a/res/color-v31/home_settings_switch_thumb_color.xml b/res/color-v31/home_settings_switch_thumb_color.xml new file mode 100644 index 0000000000..91d3d9b5e4 --- /dev/null +++ b/res/color-v31/home_settings_switch_thumb_color.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + diff --git a/res/color-v31/home_settings_switch_track_color.xml b/res/color-v31/home_settings_switch_track_color.xml new file mode 100644 index 0000000000..50784f527d --- /dev/null +++ b/res/color-v31/home_settings_switch_track_color.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + diff --git a/res/drawable-v31/home_settings_switch_thumb.xml b/res/drawable-v31/home_settings_switch_thumb.xml new file mode 100644 index 0000000000..260d5ea35f --- /dev/null +++ b/res/drawable-v31/home_settings_switch_thumb.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/res/drawable-v31/home_settings_switch_track.xml b/res/drawable-v31/home_settings_switch_track.xml new file mode 100644 index 0000000000..502a3007a9 --- /dev/null +++ b/res/drawable-v31/home_settings_switch_track.xml @@ -0,0 +1,26 @@ + + + + + + + + \ No newline at end of file diff --git a/res/layout-v31/settings_activity.xml b/res/layout-v31/settings_activity.xml new file mode 100644 index 0000000000..59e14f22dd --- /dev/null +++ b/res/layout-v31/settings_activity.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/values-night-v31/colors.xml b/res/values-night-v31/colors.xml new file mode 100644 index 0000000000..2c1bc90074 --- /dev/null +++ b/res/values-night-v31/colors.xml @@ -0,0 +1,27 @@ + + + + @android:color/system_accent1_100 + @android:color/system_neutral1_700 + @android:color/system_neutral1_900 + + @android:color/system_neutral2_300 + @android:color/system_accent2_700 + @android:color/system_neutral1_700 + \ No newline at end of file diff --git a/res/values-v31/colors.xml b/res/values-v31/colors.xml index d73ee57080..c2ebeffe66 100644 --- a/res/values-v31/colors.xml +++ b/res/values-v31/colors.xml @@ -42,6 +42,16 @@ @android:color/system_accent2_50 + @android:color/system_accent1_600 + @android:color/system_neutral1_100 + @android:color/system_neutral1_50 + + @android:color/system_accent1_100 + @android:color/system_accent2_100 + @android:color/system_neutral2_100 + @android:color/system_accent1_600 + @android:color/system_neutral2_600 + @android:color/system_accent1_100 @android:color/system_accent2_600 diff --git a/res/values-v31/config.xml b/res/values-v31/config.xml new file mode 100644 index 0000000000..afb9e6d9e8 --- /dev/null +++ b/res/values-v31/config.xml @@ -0,0 +1,20 @@ + + + + false + false + \ No newline at end of file diff --git a/res/values-v31/styles.xml b/res/values-v31/styles.xml new file mode 100644 index 0000000000..0d2fce0307 --- /dev/null +++ b/res/values-v31/styles.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/values/styles.xml b/res/values/styles.xml index d30b80c813..e4a245a5c2 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -147,18 +147,18 @@ - -