Merge "Arrow popup - adjust margin to account for RTL and LTR." into sc-dev am: 3395d1de7a

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14357192

Change-Id: I9a3cf9262bb274af4650f630e8b29ba030c30568
This commit is contained in:
TreeHugger Robot
2021-04-30 00:27:31 +00:00
committed by Automerger Merge Worker

View File

@@ -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) {