From 5337b5167a388a7e0c2c98589b74caa175926bfc Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Sat, 18 Jan 2020 19:04:13 +0000 Subject: [PATCH] sdm845-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 ++-- .../res/color/switchbar_switch_thumb_tint.xml | 20 ------------------ .../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 | 16 ++++++++++++-- 8 files changed, 62 insertions(+), 47 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 diff --git a/doze/Android.mk b/doze/Android.mk index ca106b3..3818b6f 100644 --- a/doze/Android.mk +++ b/doze/Android.mk @@ -23,4 +23,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 d191781..d74e7c0 100644 --- a/doze/res/values/styles.xml +++ b/doze/res/values/styles.xml @@ -1,7 +1,7 @@ + 0.072727273 +