From a4a4a9e4296bd8891d67f8bf4e362239772f9859 Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Sat, 18 Jan 2020 19:04:13 +0000 Subject: sdm660-common: doze: Fix dark theme issues This brings SwitchBar widget inline with 10 and fixes the theme issues when the dark mode is enabled. Change-Id: I6909b77bc649eb9eb760bf01b46f66570363e9d9 --- doze/Android.mk | 2 ++ doze/res/color/switch_bar_bg.xml | 4 ++-- doze/res/color/switchbar_switch_thumb_tint.xml | 20 -------------------- doze/res/color/switchbar_switch_track_tint.xml | 21 --------------------- doze/res/layout/switch_bar.xml | 5 +++-- doze/res/values-night/colors.xml | 20 ++++++++++++++++++++ doze/res/values/colors.xml | 21 +++++++++++++++++++++ doze/res/values/styles.xml | 13 ++++++++++++- 8 files changed, 60 insertions(+), 46 deletions(-) delete mode 100644 doze/res/color/switchbar_switch_thumb_tint.xml delete mode 100644 doze/res/color/switchbar_switch_track_tint.xml create mode 100644 doze/res/values-night/colors.xml create mode 100644 doze/res/values/colors.xml (limited to 'doze') diff --git a/doze/Android.mk b/doze/Android.mk index e72c9b5..817df97 100644 --- a/doze/Android.mk +++ b/doze/Android.mk @@ -22,4 +22,6 @@ LOCAL_RESOURCE_DIR := \ LOCAL_PROGUARD_FLAG_FILES := proguard.flags +include frameworks/base/packages/SettingsLib/common.mk + include $(BUILD_PACKAGE) diff --git a/doze/res/color/switch_bar_bg.xml b/doze/res/color/switch_bar_bg.xml index ba2dae1..ca13e3c 100644 --- a/doze/res/color/switch_bar_bg.xml +++ b/doze/res/color/switch_bar_bg.xml @@ -1,5 +1,5 @@ - - + diff --git a/doze/res/color/switchbar_switch_thumb_tint.xml b/doze/res/color/switchbar_switch_thumb_tint.xml deleted file mode 100644 index d4bf9b3..0000000 --- a/doze/res/color/switchbar_switch_thumb_tint.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - diff --git a/doze/res/color/switchbar_switch_track_tint.xml b/doze/res/color/switchbar_switch_track_tint.xml deleted file mode 100644 index ae45c7a..0000000 --- a/doze/res/color/switchbar_switch_track_tint.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - diff --git a/doze/res/layout/switch_bar.xml b/doze/res/layout/switch_bar.xml index 9e11a0a..1bf6f6c 100644 --- a/doze/res/layout/switch_bar.xml +++ b/doze/res/layout/switch_bar.xml @@ -22,7 +22,8 @@ android:paddingStart="16dp" android:paddingEnd="16dp" android:clickable="true" - android:gravity="center"> + android:gravity="center" + android:theme="@*android:style/ThemeOverlay.DeviceDefault.Accent"> diff --git a/doze/res/values-night/colors.xml b/doze/res/values-night/colors.xml new file mode 100644 index 0000000..5aa9c8e --- /dev/null +++ b/doze/res/values-night/colors.xml @@ -0,0 +1,20 @@ + + + + + #82000000 + @android:color/black + diff --git a/doze/res/values/colors.xml b/doze/res/values/colors.xml new file mode 100644 index 0000000..bb85f62 --- /dev/null +++ b/doze/res/values/colors.xml @@ -0,0 +1,21 @@ + + + + + @*android:color/material_grey_600 + #BFFFFFFF + @android:color/white + diff --git a/doze/res/values/styles.xml b/doze/res/values/styles.xml index 3443c0b..314665d 100644 --- a/doze/res/values/styles.xml +++ b/doze/res/values/styles.xml @@ -45,7 +45,10 @@ @layout/preference_material_settings - + + -- cgit v1.2.3