From 9d690bdbd7ccd9146218842fad457fcf4ecfc972 Mon Sep 17 00:00:00 2001 From: jackqdyulei Date: Thu, 9 Mar 2017 12:48:54 -0800 Subject: [PATCH] Remove hardcoded color for settings dashboard 1. Change card_background to default background color. In settings light theme, background color is exactly the #fafafa 2. Change card_background_grey to colorSecondary, which is material_grey_200 in settings light theme. Bug: 36139640 Test: Screenshot Change-Id: I20081e768985ce6c0b9000448ae48599f18b293a --- res/drawable/selectable_card.xml | 2 +- res/drawable/selectable_card_grey.xml | 2 +- res/layout/dashboard_category.xml | 3 +-- res/layout/dashboard_spacer.xml | 2 +- res/layout/support_fragment.xml | 3 +-- res/layout/support_tile_spacer.xml | 3 +-- res/values/colors.xml | 4 ---- res/values/styles.xml | 4 ++-- .../settings/dashboard/DashboardAdapterTest.java | 12 +++++++++++- .../testutils/shadow/SettingsShadowResources.java | 2 ++ 10 files changed, 21 insertions(+), 16 deletions(-) diff --git a/res/drawable/selectable_card.xml b/res/drawable/selectable_card.xml index df9ddb13670..3a1e8b26122 100644 --- a/res/drawable/selectable_card.xml +++ b/res/drawable/selectable_card.xml @@ -18,5 +18,5 @@ - + \ No newline at end of file diff --git a/res/drawable/selectable_card_grey.xml b/res/drawable/selectable_card_grey.xml index e4c73ba7040..225e72fcff1 100644 --- a/res/drawable/selectable_card_grey.xml +++ b/res/drawable/selectable_card_grey.xml @@ -18,5 +18,5 @@ - + diff --git a/res/layout/dashboard_category.xml b/res/layout/dashboard_category.xml index 2e5dd5ce064..1314c16961e 100644 --- a/res/layout/dashboard_category.xml +++ b/res/layout/dashboard_category.xml @@ -19,8 +19,7 @@ android:layout_width="match_parent" android:layout_height="@dimen/dashboard_category_height" android:orientation="vertical" - android:paddingBottom="8dip" - android:background="@color/card_background"> + android:paddingBottom="8dip"> + android:background="?android:attr/colorSecondary"/> diff --git a/res/layout/support_fragment.xml b/res/layout/support_fragment.xml index 7c79a63331b..6864d321086 100644 --- a/res/layout/support_fragment.xml +++ b/res/layout/support_fragment.xml @@ -27,6 +27,5 @@ + android:layout_width="match_parent"/> diff --git a/res/layout/support_tile_spacer.xml b/res/layout/support_tile_spacer.xml index 41cc22176b3..aa86e1e5269 100644 --- a/res/layout/support_tile_spacer.xml +++ b/res/layout/support_tile_spacer.xml @@ -18,5 +18,4 @@ + android:layout_height="@dimen/support_spacer_height"/> diff --git a/res/values/colors.xml b/res/values/colors.xml index 6705494ef0f..9e41a080b3d 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -55,8 +55,6 @@ #ff384248 #ffced7db - #fffafafa - #ffe0e0e0 @*android:color/material_deep_teal_500 @@ -99,8 +97,6 @@ #B0BEC5 - #eeeeee - #f5f5f5 diff --git a/res/values/styles.xml b/res/values/styles.xml index 269250841d8..fa40932075c 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -393,7 +393,7 @@