Fix "Emergency Information" text overflow
At large font sizes/low DPI values, the "Emergency Information" text at
the top will overflow when tapped. This change uses the new auto-resize
API to prevent the overflow.
Change-Id: Ie6d81869155b8124f8bb6f530efb2af0199351d0
Fixes: 63331318
Test: manual
diff --git a/src/com/android/phone/EmergencyActionGroup.java b/src/com/android/phone/EmergencyActionGroup.java
index 524462e..54842f3 100644
--- a/src/com/android/phone/EmergencyActionGroup.java
+++ b/src/com/android/phone/EmergencyActionGroup.java
@@ -240,6 +240,9 @@
}
private void revealTheButton(View v) {
+ CharSequence buttonText = ((Button) v).getText();
+ mSelectedLabel.setText(buttonText);
+ mSelectedLabel.setAutoSizeTextTypeWithDefaults(TextView.AUTO_SIZE_TEXT_TYPE_UNIFORM);
mSelectedContainer.setVisibility(VISIBLE);
int centerX = v.getLeft() + v.getWidth() / 2;
int centerY = v.getTop() + v.getHeight() / 2;
@@ -255,7 +258,6 @@
animateHintText(mSelectedLabel, v, reveal);
animateHintText(mLaunchHint, v, reveal);
- mSelectedLabel.setText(((Button) v).getText());
mSelectedContainer.setTag(R.id.tag_intent, v.getTag(R.id.tag_intent));
mLastRevealed = v;
postDelayed(mHideRunnable, HIDE_DELAY);