Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db895ae7 authored by Matt Pietal's avatar Matt Pietal
Browse files

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
parent c8bbb99a
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="rectangle">
    <solid android:color="?android:attr/colorBackgroundFloating" />
    <corners
        android:bottomLeftRadius="?android:attr/dialogCornerRadius"
        android:topLeftRadius="?android:attr/dialogCornerRadius"
        android:bottomRightRadius="?android:attr/dialogCornerRadius"
        android:topRightRadius="?android:attr/dialogCornerRadius"
        />
</shape>
+1 −4
Original line number Diff line number Diff line
@@ -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);