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

Commit 883af076 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix submenu position when showing with Gravity.END" into oc-dev

parents 91c6e44e 618cfc12
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -256,7 +256,7 @@ public class MenuPopupHelper implements MenuHelper {
            final int hgrav = Gravity.getAbsoluteGravity(mDropDownGravity,
                    mAnchorView.getLayoutDirection()) & Gravity.HORIZONTAL_GRAVITY_MASK;
            if (hgrav == Gravity.RIGHT) {
                xOffset -= mAnchorView.getWidth();
                xOffset += mAnchorView.getWidth();
            }

            popup.setHorizontalOffset(xOffset);
+1 −0
Original line number Diff line number Diff line
@@ -263,6 +263,7 @@ final class StandardMenuPopup extends MenuPopup implements OnDismissListener, On
                    mShownAnchorView, mOverflowOnly, mPopupStyleAttr, mPopupStyleRes);
            subPopup.setPresenterCallback(mPresenterCallback);
            subPopup.setForceShowIcon(MenuPopup.shouldPreserveIconSpacing(subMenu));
            subPopup.setGravity(mDropDownGravity);

            // Pass responsibility for handling onDismiss to the submenu.
            subPopup.setOnDismissListener(mOnDismissListener);