Realign paste box to fit in landscape mode
Bug: 32291057
Test: manual - paste in portrait and landscape mode on large and small
screen sizes.
Change-Id: I94e1de6aa3cc4c2fc33cc10884cd8747ffa0079b
diff --git a/src/com/android/calculator2/CalculatorText.java b/src/com/android/calculator2/CalculatorText.java
index 0ae9283..52b4d13 100644
--- a/src/com/android/calculator2/CalculatorText.java
+++ b/src/com/android/calculator2/CalculatorText.java
@@ -286,8 +286,8 @@
outRect.top += getTotalPaddingTop();
outRect.right -= getTotalPaddingRight();
outRect.bottom -= getTotalPaddingBottom();
- // Encourage menu positioning towards the right, possibly over formula.
- outRect.left = outRect.right;
+ // Encourage menu positioning over the rightmost 10% of the screen.
+ outRect.left = (int) (outRect.right * 0.9f);
}
};
setOnLongClickListener(new View.OnLongClickListener() {