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

Commit 2b2f6729 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Make panel menu windows respect elevation" into lmp-dev

parents 6cc6219f 594558d7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -978,6 +978,7 @@ please see themes_device_defaults.xml.
        <item name="listViewStyle">@style/Widget.Material.ListView</item>
        <item name="windowAnimationStyle">@style/Animation.DropDownUp</item>
        <item name="background">@null</item>
        <item name="windowElevation">@dimen/floating_window_z</item>
    </style>

    <style name="Theme.Material.Light.CompactMenu">
@@ -986,6 +987,7 @@ please see themes_device_defaults.xml.
        <item name="listViewStyle">@style/Widget.Material.Light.ListView</item>
        <item name="windowAnimationStyle">@style/Animation.DropDownUp</item>
        <item name="background">@null</item>
        <item name="windowElevation">@dimen/floating_window_z</item>
    </style>

    <!-- Dialog themes for Material -->
+7 −0
Original line number Diff line number Diff line
@@ -1241,6 +1241,13 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
        st.decorView = new DecorView(getContext(), st.featureId);
        st.gravity = Gravity.CENTER | Gravity.BOTTOM;
        st.setStyle(getContext());
        TypedArray a = getContext().obtainStyledAttributes(null,
                R.styleable.Window, 0, st.listPresenterTheme);
        final float elevation = a.getDimension(R.styleable.Window_windowElevation, 0);
        if (elevation != 0) {
            st.decorView.setElevation(elevation);
        }
        a.recycle();

        return true;
    }