summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2014-10-13 22:03:54 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-13 22:03:54 +0000
commitef390443eb7a6a4ac52c62aea65e7ba94f1f897a (patch)
tree23f6b759b2301bab31742cff211a51e452759ac0 /src/com
parent87b151c65090dfbfcfe09c884377cedd7fd3a34b (diff)
parenta312f7f8044a07a2a41de477cc30bb34fc1df55f (diff)
downloadpackages_apps_Settings-ef390443eb7a6a4ac52c62aea65e7ba94f1f897a.tar.gz
packages_apps_Settings-ef390443eb7a6a4ac52c62aea65e7ba94f1f897a.tar.bz2
packages_apps_Settings-ef390443eb7a6a4ac52c62aea65e7ba94f1f897a.zip
am a312f7f8: Fix battery-history-chart large-mode labels in RTL layouts.
* commit 'a312f7f8044a07a2a41de477cc30bb34fc1df55f': Fix battery-history-chart large-mode labels in RTL layouts.
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,