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

Commit 618cfc12 authored by Vladislav Kaznacheev's avatar Vladislav Kaznacheev
Browse files

Fix submenu position when showing with Gravity.END

Bug: 37792927
Test: manual
Change-Id: I2a1033cb5b78465188958d8f24128d0fe082587f
parent af12b176
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);