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

Commit 284b6ed6 authored by Zak Cohen's avatar Zak Cohen
Browse files

Arrow popup - adjust margin to account for RTL and LTR.


Bug: 185887218
Test: Local in ltr and rtl
Change-Id: I50d1e9dbc64dc02f31661d91a6c9a90e4383c5c7
parent 99d4010c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -148,6 +148,10 @@ public class ArrowTipView extends AbstractFloatingView {
        LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) findViewById(
                R.id.arrow).getLayoutParams();
        lp.gravity = gravity;

        if (parent.getLayoutDirection() == LAYOUT_DIRECTION_RTL) {
            arrowMarginStart = parent.getMeasuredWidth() - arrowMarginStart;
        }
        if (gravity == Gravity.END) {
            lp.setMarginEnd(parent.getMeasuredWidth() - arrowMarginStart);
        } else if (gravity == Gravity.START) {