From db895ae7f4fba40b8472786e09b09baa68dd1536 Mon Sep 17 00:00:00 2001 From: Matt Pietal Date: Wed, 30 Jun 2021 09:35:28 -0400 Subject: [PATCH] Controls popup background The dropdowns used for structure selection and the add/edit menu need to use fixed colors. Create a separate background drawable that will guarantee this. Fixes: 192441913 Test: manual (open control popup menus) Change-Id: Iae9d5eaf6f728c1e97edc37d563b440d64e20bcf --- .../res/drawable/global_actions_popup_bg.xml | 26 +++++++++++++++++++ .../globalactions/GlobalActionsPopupMenu.java | 5 +--- 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 packages/SystemUI/res/drawable/global_actions_popup_bg.xml diff --git a/packages/SystemUI/res/drawable/global_actions_popup_bg.xml b/packages/SystemUI/res/drawable/global_actions_popup_bg.xml new file mode 100644 index 0000000000000..fc781a0655275 --- /dev/null +++ b/packages/SystemUI/res/drawable/global_actions_popup_bg.xml @@ -0,0 +1,26 @@ + + + + + + diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsPopupMenu.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsPopupMenu.java index ac4fc62bf1c9e..d1a103e3a8fa2 100644 --- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsPopupMenu.java +++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsPopupMenu.java @@ -22,7 +22,6 @@ import android.content.res.Resources; import android.util.LayoutDirection; import android.view.View; import android.view.View.MeasureSpec; -import android.view.WindowManager; import android.widget.AdapterView; import android.widget.ListAdapter; import android.widget.ListPopupWindow; @@ -49,11 +48,9 @@ public class GlobalActionsPopupMenu extends ListPopupWindow { mContext = context; Resources res = mContext.getResources(); setBackgroundDrawable( - res.getDrawable(R.drawable.rounded_bg_full, context.getTheme())); + res.getDrawable(R.drawable.global_actions_popup_bg, context.getTheme())); mIsDropDownMode = isDropDownMode; - // required to show above the global actions dialog - setWindowLayoutType(WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY); setInputMethodMode(INPUT_METHOD_NOT_NEEDED); setModal(true);