summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/res/layout
diff options
context:
space:
mode:
authorDanesh M <daneshm90@gmail.com>2014-11-27 14:17:19 +0100
committerDanesh M <daneshm90@gmail.com>2015-10-28 13:56:26 -0700
commit2e0a11bb0bbf22c32f6e15d97ccac10414ec7b44 (patch)
tree507e61a61d64f34c9f8f4851396118037196aa60 /packages/SystemUI/res/layout
parent7af5d09de49b1c66dd35f86cbc025ee88b34a361 (diff)
downloadframeworks_base-2e0a11bb0bbf22c32f6e15d97ccac10414ec7b44.zip
frameworks_base-2e0a11bb0bbf22c32f6e15d97ccac10414ec7b44.tar.gz
frameworks_base-2e0a11bb0bbf22c32f6e15d97ccac10414ec7b44.tar.bz2
Forward port battery icon options
Squash of following patches from cm-12.1 : Battery text mode (1/2) PS2: Make battery level more fit current solution PS3: Fix displaing battery level inside the icon PS6: Show battery level in status bar header when charging and percentage mode set to inside icon (it's replaced by charging icon) Change-Id: I537c99827e78c796b4980ec7751e5f9b58a88251 Signed-off-by: kecinzer <kecinzer@gmail.com> Forward port battery icon options [1/2] Bring forward the various battery icon options. Portrait, Landscape, Circle, Text. Still retains new options for where to display battery percentage text. Change-Id: Icfc14d989eebde9014538291c24aa76d328df234 Cleanup battery style code * Cleanup commented out code * Fix landscape battery icon padding * Fix landscape battery icon charging indicator * Fix landscape battery icon percentage indicator * Fix circle battery frame color on some black backgrounds * Fix circle battery artifact on low percentage * Fix percentage not shown while charging * Fix percentage always showing on expanded status bar * Fix battery icon showing after reboot on text/hidden modes Change-Id: Ic56878c26e9a3416149eaaa8a9325d56d664e22e SystemUI : Make BatteryMeterView multi-user compatible Change-Id: Ib9a266dc74732b7ad328a6503898a8fbc46af58e Clean up battery handling. Use a single observer for all battery meter and level views, and remove no-longer used callback registrations. Change-Id: I8f9db5e484628d7fbc74fe892d64bef5f08cea24 SystemUI: Fix blinking when reported battery level is 0 Canvas::drawArc has a bug where, if the sweepAngle is 0, depending on the startAngle it will draw an empty or full circle. In the rare cases where the battery reports 0% this would cause the circular meter to blink furiously as it animates through several values of startAngle. As a workaround, let's avoid drawing the percentage bar if the reported battery level is zero. Change-Id: I4c1c767f3616c9d2f8a60df63d64ec1f4e266583 SystemUI: improve circle battery While plugged in, the circle animation would cause the statusbar to keep redrawing itself repeatedly, using up unnecessary cpu cycles, even when idle. - Removed circle animation in status bar - Left animations on keyguard/notificaiton header - Set layer type to hardware when animating for optimized quick drawing - Cleaned up some logic and unnecessary locking - Removed extra work done in each draw - override onDraw instead of draw to let the View system decide when we should draw Change-Id: If0624ab6e3723f4522ebbd9ce583b142c1cb4606 Signed-off-by: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'packages/SystemUI/res/layout')
-rw-r--r--packages/SystemUI/res/layout/keyguard_status_bar.xml2
-rw-r--r--packages/SystemUI/res/layout/status_bar.xml8
-rw-r--r--packages/SystemUI/res/layout/status_bar_expanded_header.xml2
3 files changed, 10 insertions, 2 deletions
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
index b5f917a..8d33742 100644
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
@@ -52,7 +52,7 @@
>
<include layout="@layout/system_icons" />
</FrameLayout>
- <TextView android:id="@+id/battery_level"
+ <com.android.systemui.BatteryLevelTextView android:id="@+id/battery_level_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
diff --git a/packages/SystemUI/res/layout/status_bar.xml b/packages/SystemUI/res/layout/status_bar.xml
index 2cbe61f..f0932d3 100644
--- a/packages/SystemUI/res/layout/status_bar.xml
+++ b/packages/SystemUI/res/layout/status_bar.xml
@@ -95,6 +95,14 @@
<include layout="@layout/system_icons" />
+ <com.android.systemui.BatteryLevelTextView android:id="@+id/battery_level_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_marginStart="@dimen/header_battery_margin_keyguard"
+ android:textColor="#ffffff"
+ android:textSize="@dimen/battery_level_text_size" />
+
<com.android.systemui.statusbar.policy.Clock
android:id="@+id/clock"
android:textAppearance="@style/TextAppearance.StatusBar.Clock"
diff --git a/packages/SystemUI/res/layout/status_bar_expanded_header.xml b/packages/SystemUI/res/layout/status_bar_expanded_header.xml
index 12c00cc..783054c 100644
--- a/packages/SystemUI/res/layout/status_bar_expanded_header.xml
+++ b/packages/SystemUI/res/layout/status_bar_expanded_header.xml
@@ -85,7 +85,7 @@
>
<include layout="@layout/system_icons" />
</FrameLayout>
- <TextView android:id="@+id/battery_level"
+ <com.android.systemui.BatteryLevelTextView android:id="@+id/battery_level_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"