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

This commit is contained in:
TreeHugger Robot authored and Android (Google) Code Review committed 2021-04-30 00:05:27 +00:00
commit 3395d1de7a
1 file changed
+4
@@ -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) {