From c93d6948e06566f03a82ae12e24571d990a9d885 Mon Sep 17 00:00:00 2001 From: Charlie Anderson Date: Tue, 14 Mar 2023 13:18:56 -0400 Subject: [PATCH] sets the initial arrow color for the popup to match the popup background. Bug: 247880037 Test: tested popups manually on device Change-Id: I6374e1a20aaeac1eb375108a91f0a49c088a15a9 --- src/com/android/launcher3/popup/ArrowPopup.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/com/android/launcher3/popup/ArrowPopup.java b/src/com/android/launcher3/popup/ArrowPopup.java index 9d06d4a6fa..0edf2921ae 100644 --- a/src/com/android/launcher3/popup/ArrowPopup.java +++ b/src/com/android/launcher3/popup/ArrowPopup.java @@ -140,13 +140,11 @@ public abstract class ArrowPopup mOutlineRadius = Themes.getDialogCornerRadius(context); mActivityContext = ActivityContext.lookupContext(context); mIsRtl = Utilities.isRtl(getResources()); - - int popupPrimaryColor = Themes.getAttrColor(context, R.attr.popupColorPrimary); - mArrowColor = popupPrimaryColor; mElevation = getResources().getDimension(R.dimen.deep_shortcuts_elevation); // Initialize arrow view final Resources resources = getResources(); + mArrowColor = getColorStateList(getContext(), R.color.popup_shade_first).getDefaultColor(); mMargin = resources.getDimensionPixelSize(R.dimen.popup_margin); mArrowWidth = resources.getDimensionPixelSize(R.dimen.popup_arrow_width); mArrowHeight = resources.getDimensionPixelSize(R.dimen.popup_arrow_height); @@ -159,6 +157,7 @@ public abstract class ArrowPopup int smallerRadius = resources.getDimensionPixelSize(R.dimen.popup_smaller_radius); mRoundedTop = new GradientDrawable(); + int popupPrimaryColor = Themes.getAttrColor(context, R.attr.popupColorPrimary); mRoundedTop.setColor(popupPrimaryColor); mRoundedTop.setCornerRadii(new float[] { mOutlineRadius, mOutlineRadius, mOutlineRadius, mOutlineRadius, smallerRadius, smallerRadius, smallerRadius, smallerRadius});