summaryrefslogtreecommitdiffstats
path: root/packages/Keyguard
diff options
context:
space:
mode:
authorDanesh M <danesh@cyngn.com>2016-06-27 16:26:33 -0700
committerDanesh M <daneshm90@gmail.com>2016-06-28 16:30:04 -0700
commit51d2d193f88c4353783ed387726e718547a7f5ce (patch)
tree90fe5db6719178425da156ff2ab4b2d7205edf59 /packages/Keyguard
parent545dc46798d26328b6dc503663a771b37797eca5 (diff)
downloadframeworks_base-51d2d193f88c4353783ed387726e718547a7f5ce.zip
frameworks_base-51d2d193f88c4353783ed387726e718547a7f5ce.tar.gz
frameworks_base-51d2d193f88c4353783ed387726e718547a7f5ce.tar.bz2
KeyguardSecurityViewFlipper : Fix sim unlock height overlap
If the font size is set to Huge, and pin lockscreen + sim unlock screen is showing, the text for the pinpad overlaps. Reason is we enforce the smallest maxHeight on all children, and this breaks certain screens. Just let each child use its own maxHeight that it set to begin with. FEIJ-184 Change-Id: I3b461f6f75a3f541281fb32efc83a891ca7b65f0
Diffstat (limited to 'packages/Keyguard')
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java17
1 files changed, 2 insertions, 15 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java
index 6012c45..a47e3f5 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityViewFlipper.java
@@ -202,25 +202,10 @@ public class KeyguardSecurityViewFlipper extends ViewFlipper implements Keyguard
final int widthSize = MeasureSpec.getSize(widthSpec);
final int heightSize = MeasureSpec.getSize(heightSpec);
- int maxWidth = widthSize;
- int maxHeight = heightSize;
final int count = getChildCount();
- for (int i = 0; i < count; i++) {
- final View child = getChildAt(i);
- final LayoutParams lp = (LayoutParams) child.getLayoutParams();
-
- if (lp.maxWidth > 0 && lp.maxWidth < maxWidth) {
- maxWidth = lp.maxWidth;
- }
- if (lp.maxHeight > 0 && lp.maxHeight < maxHeight) {
- maxHeight = lp.maxHeight;
- }
- }
final int wPadding = getPaddingLeft() + getPaddingRight();
final int hPadding = getPaddingTop() + getPaddingBottom();
- maxWidth = Math.max(0, maxWidth - wPadding);
- maxHeight = Math.max(0, maxHeight - hPadding);
int width = widthMode == MeasureSpec.EXACTLY ? widthSize : 0;
int height = heightMode == MeasureSpec.EXACTLY ? heightSize : 0;
@@ -228,6 +213,8 @@ public class KeyguardSecurityViewFlipper extends ViewFlipper implements Keyguard
final View child = getChildAt(i);
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
+ int maxWidth = Math.max(0, lp.maxWidth - wPadding);
+ int maxHeight = Math.max(0, lp.maxHeight - hPadding);
final int childWidthSpec = makeChildMeasureSpec(maxWidth, lp.width);
final int childHeightSpec = makeChildMeasureSpec(maxHeight, lp.height);