Update Power Anomaly UI.
For Settings tip & app anomaly banner: - update app anomaly hint color in dark/light theme [Banner card] - update icons to GM3 style - update text font and button text color - update button style from outlined to filled. [Chart view] - update warning icon size - update percentage label alignment Screenshots: - [Settings] [light] https://screenshot.googleplex.com/ERWkD7TmDsLaxdG [dark] https://screenshot.googleplex.com/6JKvL5vEQTZtJfd - [App] [light] https://screenshot.googleplex.com/3YoncDhGTzUcAZA https://screenshot.googleplex.com/3hbGmqoYWSy9H9U [dark] https://screenshot.googleplex.com/9XKs8tXmRKL2jJP https://screenshot.googleplex.com/SU4LTJYWXvpd42r - [RTL+L10N][Arabic] [Settings] https://screenshot.googleplex.com/V9HJkPcsoBJmsW8 [Apps] https://screenshot.googleplex.com/B49VKy2jaZYisWK https://screenshot.googleplex.com/6VZQ2gESRes8RMH - [Force RTL][EN] [Settings] https://screenshot.googleplex.com/4V7coyLf5ueUcGv [Apps] https://screenshot.googleplex.com/9UaERwDmrpitqdq https://screenshot.googleplex.com/3JDfcXi8pmz5Mew Bug: 309569299 Test: manual Change-Id: I8bee7f86d602112e0cbbd936b439330aaff7275c
This commit is contained in:
@@ -378,7 +378,7 @@ public class BatteryChartView extends AppCompatImageView implements View.OnClick
|
||||
mTransomTop = resources.getDimensionPixelSize(R.dimen.chartview_transom_padding_top);
|
||||
mTransomLineDefaultColor = Utils.getDisabled(mContext, DIVIDER_COLOR);
|
||||
mTransomLineSelectedColor =
|
||||
resources.getColor(R.color.color_battery_anomaly_yellow_selector);
|
||||
resources.getColor(R.color.color_battery_anomaly_app_warning_selector);
|
||||
final int slotHighlightColor = Utils.getDisabled(mContext, mTransomLineSelectedColor);
|
||||
mTransomIconSize = resources.getDimensionPixelSize(R.dimen.chartview_transom_icon_size);
|
||||
mTransomLinePaint = new Paint();
|
||||
@@ -419,11 +419,13 @@ public class BatteryChartView extends AppCompatImageView implements View.OnClick
|
||||
|
||||
private void drawPercentage(Canvas canvas, int index, float offsetY) {
|
||||
if (mTextPaint != null) {
|
||||
mTextPaint.setTextAlign(Paint.Align.RIGHT);
|
||||
mTextPaint.setTextAlign(isRTL() ? Paint.Align.RIGHT : Paint.Align.LEFT);
|
||||
mTextPaint.setColor(mDefaultTextColor);
|
||||
canvas.drawText(
|
||||
mPercentages[index],
|
||||
isRTL() ? mIndent.left - mTextPadding : getWidth(),
|
||||
isRTL()
|
||||
? mIndent.left - mTextPadding
|
||||
: getWidth() - mIndent.width() + mTextPadding,
|
||||
offsetY + mPercentageBounds[index].height() * .5f,
|
||||
mTextPaint);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user