diff options
author | Fabian Kozynski <kozynski@google.com> | 2019-04-04 15:57:42 -0400 |
---|---|---|
committer | Fabian Kozynski <kozynski@google.com> | 2019-04-08 13:21:12 -0400 |
commit | bca09b7c00d3c85d4a53c1d0a07433eeecb3646a (patch) | |
tree | 85340b598c03ac0c2bfa4c390f63bce08166cd8b /packages/SystemUI/src/com/android/systemui/BatteryMeterView.java | |
parent | 9dfc48d06e0156c52df748ff64aa3bd2e09cd211 (diff) |
Visual changes to QS header
Change TextAppearance in QS header.
Also, reduce size of QS tile background. Removed extra padding in the
bottom of QSIconViewImpl that was not needed.
Test: visual
Bug: 124466915
Change-Id: I0b8db6edad7f8527caff76f9419c42a8016a6bda
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/BatteryMeterView.java')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/BatteryMeterView.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java index 62b0542bd7fe..329b001a0a7c 100644 --- a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java +++ b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java @@ -47,6 +47,8 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.StyleRes; + import com.android.settingslib.Utils; import com.android.settingslib.graph.ThemedBatteryDrawable; import com.android.systemui.plugins.DarkIconDispatcher; @@ -86,6 +88,7 @@ public class BatteryMeterView extends LinearLayout implements private BatteryController mBatteryController; private SettingObserver mSettingObserver; + private final @StyleRes int mPercentageStyleId; private int mTextColor; private int mLevel; private int mShowPercentMode = MODE_DEFAULT; @@ -132,6 +135,7 @@ public class BatteryMeterView extends LinearLayout implements defStyle, 0); final int frameColor = atts.getColor(R.styleable.BatteryMeterView_frameColor, context.getColor(R.color.meter_background_color)); + mPercentageStyleId = atts.getResourceId(R.styleable.BatteryMeterView_textAppearance, 0); mDrawable = new ThemedBatteryDrawable(context, frameColor); atts.recycle(); @@ -402,6 +406,9 @@ public class BatteryMeterView extends LinearLayout implements if (!showing) { mBatteryPercentView = loadPercentView(); if (mTextColor != 0) mBatteryPercentView.setTextColor(mTextColor); + if (mPercentageStyleId != 0) { // Only set if specified as attribute + mBatteryPercentView.setTextAppearance(mPercentageStyleId); + } updatePercentText(); addView(mBatteryPercentView, new ViewGroup.LayoutParams( @@ -440,7 +447,6 @@ public class BatteryMeterView extends LinearLayout implements scaledLayoutParams.setMargins(0, 0, 0, marginBottom); mBatteryIconView.setLayoutParams(scaledLayoutParams); - FontSizeUtils.updateFontSize(mBatteryPercentView, R.dimen.qs_time_expanded_size); } @Override |