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

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

Change-Id: I00f97cf8e091dfdc396023978e0f8a435ea8c6e2
This commit is contained in:
TreeHugger Robot
2021-04-30 00:52:19 +00:00
committed by Automerger Merge Worker
@@ -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) {