summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2014-10-13 15:48:50 -0400
committerJohn Spurlock <jspurlock@google.com>2014-10-13 15:48:50 -0400
commita312f7f8044a07a2a41de477cc30bb34fc1df55f (patch)
tree6ef8d241e50bb184686689646c225d3a0fb98811 /src/com
parent178db4d5f7522a81ee5cce02ccbb080c2e555697 (diff)
downloadpackages_apps_Settings-a312f7f8044a07a2a41de477cc30bb34fc1df55f.tar.gz
packages_apps_Settings-a312f7f8044a07a2a41de477cc30bb34fc1df55f.tar.bz2
packages_apps_Settings-a312f7f8044a07a2a41de477cc30bb34fc1df55f.zip
Fix battery-history-chart large-mode labels in RTL layouts.
Bug: 17425651 Change-Id: Iae53e111fa3c6bc822821a6a30bd34edb058c1a5
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/settings/fuelgauge/BatteryHistoryChart.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/settings/fuelgauge/BatteryHistoryChart.java b/src/com/android/settings/fuelgauge/BatteryHistoryChart.java
index fbd0ea3ed..765f101fc 100644
--- a/src/com/android/settings/fuelgauge/BatteryHistoryChart.java
+++ b/src/com/android/settings/fuelgauge/BatteryHistoryChart.java
@@ -1272,6 +1272,8 @@ public class BatteryHistoryChart extends View {
if (mLargeMode) {
if (DEBUG) Log.d(TAG, "Drawing large mode labels");
+ Paint.Align align = mTextPaint.getTextAlign();
+ mTextPaint.setTextAlign(textAlignLeft); // large-mode labels always aligned to start
if (mHavePhoneSignal) {
canvas.drawText(mPhoneSignalLabel, textStartX,
height - mPhoneSignalOffset - mTextDescent, mTextPaint);
@@ -1290,6 +1292,7 @@ public class BatteryHistoryChart extends View {
height - mChargingOffset - mTextDescent, mTextPaint);
canvas.drawText(mScreenOnLabel, textStartX,
height - mScreenOnOffset - mTextDescent, mTextPaint);
+ mTextPaint.setTextAlign(align);
}
canvas.drawLine(mLevelLeft-mThinLineWidth, mLevelTop, mLevelLeft-mThinLineWidth,