Merge "Only set arrow color once when below icon." into sc-v2-dev am: 3fca6717ed
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15936545
Change-Id: I6c1d7d2daa9cc78f3c9ca3b57234d6e0d02aaa15
diff --git a/src/com/android/launcher3/popup/ArrowPopup.java b/src/com/android/launcher3/popup/ArrowPopup.java
index 1a5d141..2230914 100644
--- a/src/com/android/launcher3/popup/ArrowPopup.java
+++ b/src/com/android/launcher3/popup/ArrowPopup.java
@@ -270,6 +270,15 @@
backgroundColor = colors[numVisibleChild % colors.length];
}
+ if (!ENABLE_LOCAL_COLOR_POPUPS.get()) {
+ // Arrow color matches the first child or the last child.
+ if (!mIsAboveIcon && numVisibleChild == 0 && viewGroup == this) {
+ mArrowColor = backgroundColor;
+ } else if (mIsAboveIcon) {
+ mArrowColor = backgroundColor;
+ }
+ }
+
if (view instanceof ViewGroup && mIterateChildrenTag.equals(view.getTag())) {
assignMarginsAndBackgrounds((ViewGroup) view, backgroundColor);
numVisibleChild++;
@@ -293,12 +302,6 @@
if (!ENABLE_LOCAL_COLOR_POPUPS.get()) {
setChildColor(view, backgroundColor, colorAnimator);
- // Arrow color matches the first child or the last child.
- if (!mIsAboveIcon && numVisibleChild == 0) {
- mArrowColor = backgroundColor;
- } else if (mIsAboveIcon) {
- mArrowColor = backgroundColor;
- }
}
numVisibleChild++;