From 6a936e3ec43af77dde93eefe0c06e6ce86a748b7 Mon Sep 17 00:00:00 2001 From: Jon Miranda Date: Thu, 24 Jun 2021 10:58:56 -0700 Subject: [PATCH] Update colors for non-v31 devices. Also renamed to popup color to popup shade to better differentiate between the primary/secondary/tertirary popup colors. Bug: 191496301 Test: Removed v31 colors to verify the non-v31 colors, that the shades are as expected Tested on wallpapaper with light text, again with dark mode Tested on wallpaper with dark text, and then again with dark mode Change-Id: I3ec9ee7f85696ee48224740a1ec7f4abe42348ee --- .../{popup_color_first.xml => popup_shade_first.xml} | 0 ...{popup_color_second.xml => popup_shade_second.xml} | 0 .../{popup_color_third.xml => popup_shade_third.xml} | 0 .../{popup_color_first.xml => popup_shade_first.xml} | 0 ...{popup_color_second.xml => popup_shade_second.xml} | 0 .../{popup_color_third.xml => popup_shade_third.xml} | 0 .../{popup_color_first.xml => popup_shade_first.xml} | 2 +- ...{popup_color_second.xml => popup_shade_second.xml} | 2 +- .../{popup_color_third.xml => popup_shade_third.xml} | 2 +- res/values/attrs.xml | 3 +++ res/values/colors.xml | 11 +++++++++-- res/values/styles.xml | 6 ++++++ src/com/android/launcher3/popup/ArrowPopup.java | 8 ++++---- 13 files changed, 25 insertions(+), 9 deletions(-) rename res/color-night-v31/{popup_color_first.xml => popup_shade_first.xml} (100%) rename res/color-night-v31/{popup_color_second.xml => popup_shade_second.xml} (100%) rename res/color-night-v31/{popup_color_third.xml => popup_shade_third.xml} (100%) rename res/color-v31/{popup_color_first.xml => popup_shade_first.xml} (100%) rename res/color-v31/{popup_color_second.xml => popup_shade_second.xml} (100%) rename res/color-v31/{popup_color_third.xml => popup_shade_third.xml} (100%) rename res/color/{popup_color_first.xml => popup_shade_first.xml} (93%) rename res/color/{popup_color_second.xml => popup_shade_second.xml} (93%) rename res/color/{popup_color_third.xml => popup_shade_third.xml} (92%) diff --git a/res/color-night-v31/popup_color_first.xml b/res/color-night-v31/popup_shade_first.xml similarity index 100% rename from res/color-night-v31/popup_color_first.xml rename to res/color-night-v31/popup_shade_first.xml diff --git a/res/color-night-v31/popup_color_second.xml b/res/color-night-v31/popup_shade_second.xml similarity index 100% rename from res/color-night-v31/popup_color_second.xml rename to res/color-night-v31/popup_shade_second.xml diff --git a/res/color-night-v31/popup_color_third.xml b/res/color-night-v31/popup_shade_third.xml similarity index 100% rename from res/color-night-v31/popup_color_third.xml rename to res/color-night-v31/popup_shade_third.xml diff --git a/res/color-v31/popup_color_first.xml b/res/color-v31/popup_shade_first.xml similarity index 100% rename from res/color-v31/popup_color_first.xml rename to res/color-v31/popup_shade_first.xml diff --git a/res/color-v31/popup_color_second.xml b/res/color-v31/popup_shade_second.xml similarity index 100% rename from res/color-v31/popup_color_second.xml rename to res/color-v31/popup_shade_second.xml diff --git a/res/color-v31/popup_color_third.xml b/res/color-v31/popup_shade_third.xml similarity index 100% rename from res/color-v31/popup_color_third.xml rename to res/color-v31/popup_shade_third.xml diff --git a/res/color/popup_color_first.xml b/res/color/popup_shade_first.xml similarity index 93% rename from res/color/popup_color_first.xml rename to res/color/popup_shade_first.xml index d9999a20c8..151190b6d4 100644 --- a/res/color/popup_color_first.xml +++ b/res/color/popup_shade_first.xml @@ -14,5 +14,5 @@ limitations under the License. --> - + diff --git a/res/color/popup_color_second.xml b/res/color/popup_shade_second.xml similarity index 93% rename from res/color/popup_color_second.xml rename to res/color/popup_shade_second.xml index d9999a20c8..86608501f0 100644 --- a/res/color/popup_color_second.xml +++ b/res/color/popup_shade_second.xml @@ -14,5 +14,5 @@ limitations under the License. --> - + diff --git a/res/color/popup_color_third.xml b/res/color/popup_shade_third.xml similarity index 92% rename from res/color/popup_color_third.xml rename to res/color/popup_shade_third.xml index d7e9e794e2..95447288fd 100644 --- a/res/color/popup_color_third.xml +++ b/res/color/popup_shade_third.xml @@ -14,5 +14,5 @@ limitations under the License. --> - + \ No newline at end of file diff --git a/res/values/attrs.xml b/res/values/attrs.xml index 1fadc881c2..52df1d3ab0 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -25,6 +25,9 @@ + + + diff --git a/res/values/colors.xml b/res/values/colors.xml index 01f5364459..e32eea0e4a 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -53,6 +53,13 @@ #202124 #757575 + #F9F9F9 + #F1F1F1 + #E2E2E2 + #303030 + #262626 + #1B1B1B + #FFF #757575 @@ -62,8 +69,8 @@ #FFF #FF000000 - #FFFFFF - #FF3C4043 + #F9F9F9 + #464746 ?attr/colorPrimary diff --git a/res/values/styles.xml b/res/values/styles.xml index 871214fc4f..dbb1b0ea52 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -37,6 +37,9 @@ @color/popup_color_primary_light @color/popup_color_secondary_light @color/popup_color_tertiary_light + @color/popup_shade_first_light + @color/popup_shade_second_light + @color/popup_shade_third_light @color/popup_notification_dot_light false false @@ -97,6 +100,9 @@ @color/popup_color_secondary_dark @color/popup_color_tertiary_dark @color/popup_notification_dot_dark + @color/popup_shade_first_dark + @color/popup_shade_second_dark + @color/popup_shade_third_dark @style/WidgetContainerTheme.Dark @color/folder_dot_color @color/folder_background_dark diff --git a/src/com/android/launcher3/popup/ArrowPopup.java b/src/com/android/launcher3/popup/ArrowPopup.java index a89fb3b618..b7fe3480fa 100644 --- a/src/com/android/launcher3/popup/ArrowPopup.java +++ b/src/com/android/launcher3/popup/ArrowPopup.java @@ -183,12 +183,12 @@ public abstract class ArrowPopup> if (isAboveAnotherSurface) { mColors = new int[] { - getColorStateList(context, R.color.popup_color_first).getDefaultColor()}; + getColorStateList(context, R.color.popup_shade_first).getDefaultColor()}; } else { mColors = new int[] { - getColorStateList(context, R.color.popup_color_first).getDefaultColor(), - getColorStateList(context, R.color.popup_color_second).getDefaultColor(), - getColorStateList(context, R.color.popup_color_third).getDefaultColor()}; + getColorStateList(context, R.color.popup_shade_first).getDefaultColor(), + getColorStateList(context, R.color.popup_shade_second).getDefaultColor(), + getColorStateList(context, R.color.popup_shade_third).getDefaultColor()}; } }