From 496d12a1f3e134f6c1ea7b23ca50c00a6ad56df3 Mon Sep 17 00:00:00 2001 From: Ezio Lacandia Bijelkic Date: Tue, 22 Nov 2016 17:00:27 -0500 Subject: [PATCH] Circle and landscape battery perc inside the icon: use bigger text Circle: https://s18.postimg.org/4zbfvog2h/Screenshot_20161123_001840.png Landscape: https://s22.postimg.org/w9m8k3w5t/Screenshot_20161123_001902.png Change-Id: Ic11c82b8e40c00fd5c0009a358d1357b08c99a2c --- .../com/android/systemui/BatteryMeterDrawable.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/BatteryMeterDrawable.java b/packages/SystemUI/src/com/android/systemui/BatteryMeterDrawable.java index ca8467983192..ab50b48fdb5f 100755 --- a/packages/SystemUI/src/com/android/systemui/BatteryMeterDrawable.java +++ b/packages/SystemUI/src/com/android/systemui/BatteryMeterDrawable.java @@ -614,7 +614,18 @@ private void init() { final float widthDiv2 = mWidth / 2f; // text size is width / 2 - 2dp for wiggle room - final float textSize = mStyle == 2 ? widthDiv2 - mContext.getResources().getDisplayMetrics().density * 2 : widthDiv2; + final float textSize; + switch(mStyle) { + case 2: + textSize = widthDiv2 - mContext.getResources().getDisplayMetrics().density / 1.3f; + break; + case 5: + textSize = widthDiv2 * 1.3f; + break; + default: + textSize = widthDiv2; + break; + } mTextAndBoltPaint.setTextSize(textSize); mWarningTextPaint.setTextSize(textSize);