Loading packages/SystemUI/res/values/styles.xml +1 −0 Original line number Diff line number Diff line Loading @@ -758,6 +758,7 @@ <!-- used to override dark/light theming --> <item name="*android:colorBackgroundFloating">@color/GM2_grey_800</item> <item name="*android:colorPopupBackground">@color/GM2_grey_800</item> <item name="*android:dialogCornerRadius">8dp</item> </style> <style name="TextAppearance.ControlSetup"> Loading packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt +9 −6 Original line number Diff line number Diff line Loading @@ -107,6 +107,7 @@ class ControlsUiControllerImpl @Inject constructor ( private var popup: ListPopupWindow? = null private var hidden = true private lateinit var dismissGlobalActions: Runnable private val popupThemedContext = ContextThemeWrapper(context, R.style.Control_ListPopupWindow) override val available: Boolean get() = controlsController.get().available Loading Loading @@ -283,7 +284,10 @@ class ControlsUiControllerImpl @Inject constructor ( val anchor = parent.requireViewById<ImageView>(R.id.controls_more) anchor.setOnClickListener(object : View.OnClickListener { override fun onClick(v: View) { popup = GlobalActionsPopupMenu(context, false /* isDropDownMode */).apply { popup = GlobalActionsPopupMenu( popupThemedContext, false /* isDropDownMode */ ).apply { setAnchorView(anchor) setAdapter(adapter) setOnItemClickListener(object : AdapterView.OnItemClickListener { Loading Loading @@ -380,13 +384,12 @@ class ControlsUiControllerImpl @Inject constructor ( val anchor = parent.requireViewById<ViewGroup>(R.id.controls_header) anchor.setOnClickListener(object : View.OnClickListener { override fun onClick(v: View) { popup = GlobalActionsPopupMenu(context, true /* isDropDownMode */).apply { popup = GlobalActionsPopupMenu( popupThemedContext, true /* isDropDownMode */ ).apply { setAnchorView(anchor) setAdapter(adapter) val theme = ContextThemeWrapper(context, R.style.Control_ListPopupWindow) .getTheme() setBackgroundDrawable( context.resources.getDrawable(R.drawable.rounded_bg_full, theme)) setOnItemClickListener(object : AdapterView.OnItemClickListener { override fun onItemClick( Loading packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java +4 −1 Original line number Diff line number Diff line Loading @@ -2047,7 +2047,10 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, private ListPopupWindow createPowerOverflowPopup() { ListPopupWindow popup = new GlobalActionsPopupMenu( mContext, false /* isDropDownMode */); new ContextThemeWrapper( mContext, com.android.systemui.R.style.Control_ListPopupWindow ), false /* isDropDownMode */); View overflowButton = findViewById(com.android.systemui.R.id.global_actions_overflow_button); popup.setAnchorView(overflowButton); Loading packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsPopupMenu.java +6 −3 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.content.Context; import android.content.res.Resources; import android.view.ContextThemeWrapper; import android.view.View; import android.view.View.MeasureSpec; import android.view.WindowManager; Loading @@ -32,6 +31,8 @@ import com.android.systemui.R; /** * Customized widget for use in the GlobalActionsDialog. Ensures common positioning and user * interactions. * * It should be created with a {@link Context} with the right theme */ public class GlobalActionsPopupMenu extends ListPopupWindow { private Context mContext; Loading @@ -42,15 +43,17 @@ public class GlobalActionsPopupMenu extends ListPopupWindow { private ListAdapter mAdapter; public GlobalActionsPopupMenu(@NonNull Context context, boolean isDropDownMode) { super(new ContextThemeWrapper(context, R.style.Control_ListPopupWindow)); super(context); mContext = context; Resources res = mContext.getResources(); setBackgroundDrawable( res.getDrawable(R.drawable.rounded_bg_full, context.getTheme())); mIsDropDownMode = isDropDownMode; // required to show above the global actions dialog setWindowLayoutType(WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY); setModal(true); Resources res = mContext.getResources(); mGlobalActionsSidePadding = res.getDimensionPixelSize(R.dimen.global_actions_side_margin); if (!isDropDownMode) { mMenuVerticalPadding = res.getDimensionPixelSize(R.dimen.control_menu_vertical_padding); Loading Loading
packages/SystemUI/res/values/styles.xml +1 −0 Original line number Diff line number Diff line Loading @@ -758,6 +758,7 @@ <!-- used to override dark/light theming --> <item name="*android:colorBackgroundFloating">@color/GM2_grey_800</item> <item name="*android:colorPopupBackground">@color/GM2_grey_800</item> <item name="*android:dialogCornerRadius">8dp</item> </style> <style name="TextAppearance.ControlSetup"> Loading
packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt +9 −6 Original line number Diff line number Diff line Loading @@ -107,6 +107,7 @@ class ControlsUiControllerImpl @Inject constructor ( private var popup: ListPopupWindow? = null private var hidden = true private lateinit var dismissGlobalActions: Runnable private val popupThemedContext = ContextThemeWrapper(context, R.style.Control_ListPopupWindow) override val available: Boolean get() = controlsController.get().available Loading Loading @@ -283,7 +284,10 @@ class ControlsUiControllerImpl @Inject constructor ( val anchor = parent.requireViewById<ImageView>(R.id.controls_more) anchor.setOnClickListener(object : View.OnClickListener { override fun onClick(v: View) { popup = GlobalActionsPopupMenu(context, false /* isDropDownMode */).apply { popup = GlobalActionsPopupMenu( popupThemedContext, false /* isDropDownMode */ ).apply { setAnchorView(anchor) setAdapter(adapter) setOnItemClickListener(object : AdapterView.OnItemClickListener { Loading Loading @@ -380,13 +384,12 @@ class ControlsUiControllerImpl @Inject constructor ( val anchor = parent.requireViewById<ViewGroup>(R.id.controls_header) anchor.setOnClickListener(object : View.OnClickListener { override fun onClick(v: View) { popup = GlobalActionsPopupMenu(context, true /* isDropDownMode */).apply { popup = GlobalActionsPopupMenu( popupThemedContext, true /* isDropDownMode */ ).apply { setAnchorView(anchor) setAdapter(adapter) val theme = ContextThemeWrapper(context, R.style.Control_ListPopupWindow) .getTheme() setBackgroundDrawable( context.resources.getDrawable(R.drawable.rounded_bg_full, theme)) setOnItemClickListener(object : AdapterView.OnItemClickListener { override fun onItemClick( Loading
packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java +4 −1 Original line number Diff line number Diff line Loading @@ -2047,7 +2047,10 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, private ListPopupWindow createPowerOverflowPopup() { ListPopupWindow popup = new GlobalActionsPopupMenu( mContext, false /* isDropDownMode */); new ContextThemeWrapper( mContext, com.android.systemui.R.style.Control_ListPopupWindow ), false /* isDropDownMode */); View overflowButton = findViewById(com.android.systemui.R.id.global_actions_overflow_button); popup.setAnchorView(overflowButton); Loading
packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsPopupMenu.java +6 −3 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.content.Context; import android.content.res.Resources; import android.view.ContextThemeWrapper; import android.view.View; import android.view.View.MeasureSpec; import android.view.WindowManager; Loading @@ -32,6 +31,8 @@ import com.android.systemui.R; /** * Customized widget for use in the GlobalActionsDialog. Ensures common positioning and user * interactions. * * It should be created with a {@link Context} with the right theme */ public class GlobalActionsPopupMenu extends ListPopupWindow { private Context mContext; Loading @@ -42,15 +43,17 @@ public class GlobalActionsPopupMenu extends ListPopupWindow { private ListAdapter mAdapter; public GlobalActionsPopupMenu(@NonNull Context context, boolean isDropDownMode) { super(new ContextThemeWrapper(context, R.style.Control_ListPopupWindow)); super(context); mContext = context; Resources res = mContext.getResources(); setBackgroundDrawable( res.getDrawable(R.drawable.rounded_bg_full, context.getTheme())); mIsDropDownMode = isDropDownMode; // required to show above the global actions dialog setWindowLayoutType(WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY); setModal(true); Resources res = mContext.getResources(); mGlobalActionsSidePadding = res.getDimensionPixelSize(R.dimen.global_actions_side_margin); if (!isDropDownMode) { mMenuVerticalPadding = res.getDimensionPixelSize(R.dimen.control_menu_vertical_padding); Loading