Polish layout configurations
Bug: 30089158
- Match previous fullscreen layouts on supported devices.
- Prevent clipping in some MW layouts.
- Experimental support for freeform:
adb shell settings put global enable_freeform_support 1
Change-Id: Ia6568d337709fa1b1420d88cb3c701e048ce7a25
diff --git a/src/com/android/calculator2/CalculatorResult.java b/src/com/android/calculator2/CalculatorResult.java
index 0baed38..234f602 100644
--- a/src/com/android/calculator2/CalculatorResult.java
+++ b/src/com/android/calculator2/CalculatorResult.java
@@ -209,9 +209,6 @@
}
setCursorVisible(false);
-
- // Set a minimum height so scaled error messages won't affect our layout.
- setMinimumHeight(getLineHeight() + getCompoundPaddingBottom() + getCompoundPaddingTop());
}
void setEvaluator(Evaluator evaluator) {
@@ -235,6 +232,12 @@
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ if (!isLaidOut()) {
+ // Set a minimum height so scaled error messages won't affect our layout.
+ setMinimumHeight(getLineHeight() + getCompoundPaddingBottom()
+ + getCompoundPaddingTop());
+ }
+
final TextPaint paint = getPaint();
final Context context = getContext();
final float newCharWidth = getMaxDigitWidth(paint);