From 8dd11327b65beeadaf25de5caaf04e699753d67c Mon Sep 17 00:00:00 2001 From: Andrew Sapperstein Date: Mon, 16 May 2016 17:27:12 -0700 Subject: [PATCH] Refactor Settings theme colors. Introduces stock colors (primary_color, primary_dark_color, etc) to allow overriding the colors via resource overlays. Creates new colorSecondary attribute and updates switches to use theme attributes for foreground/background colors rather than hardcoded values. Some other mild color cleanup to make things more straightforward. BUG: 28760785 Change-Id: I4deba962357217bdb2e08c08e8f83b9b57a683d4 --- res/drawable/switchbar_background.xml | 2 +- res/layout/switch_bar.xml | 2 +- res/values/attrs.xml | 2 ++ res/values/colors.xml | 10 +++++++--- res/values/themes.xml | 24 +++++++++++------------- 5 files changed, 22 insertions(+), 18 deletions(-) diff --git a/res/drawable/switchbar_background.xml b/res/drawable/switchbar_background.xml index ac340be412a..3d729fdec67 100644 --- a/res/drawable/switchbar_background.xml +++ b/res/drawable/switchbar_background.xml @@ -16,6 +16,6 @@ - + diff --git a/res/layout/switch_bar.xml b/res/layout/switch_bar.xml index a31bd3e721f..8b69a1d1af2 100644 --- a/res/layout/switch_bar.xml +++ b/res/layout/switch_bar.xml @@ -44,7 +44,7 @@ android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:background="@null" - android:theme="@style/ThemeOverlay.SwitchBar" /> + android:theme="@style/ThemeOverlay.SwitchBar.Settings" /> diff --git a/res/values/attrs.xml b/res/values/attrs.xml index 0a072aed238..ca3d247354d 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -121,6 +121,8 @@ + + diff --git a/res/values/colors.xml b/res/values/colors.xml index 81f3d32873e..003eda9d0d8 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -74,9 +74,6 @@ #ffffffff - #ff37474f - #ff7fcac3 - #ffe0e0e0 @*android:color/material_deep_teal_500 @@ -108,6 +105,7 @@ #4d000000 + #5e97f6 #4285F4 #3367D6 @@ -133,4 +131,10 @@ #eeeeee + @color/material_blue_grey_900 + @color/material_blue_grey_950 + #ff37474f + @color/accent_material_light + #ff7fcac3 + diff --git a/res/values/themes.xml b/res/values/themes.xml index ec59e4fce0c..011957b71b9 100644 --- a/res/values/themes.xml +++ b/res/values/themes.xml @@ -96,7 +96,7 @@ @null - - - -