Please sign in to comment.
Add CmCircleBattery to StatusBar options (1/2)
Cyanogenmod Circle Battery implementation - Done 100% in pure code, wont blow up the framework with countless png resources - View can be shown with or without percentage as text inside - Indicator turns holo-red below 15%. - All sizes are calculated on the fly and should work on all current and future screen resolutions. (needs testing) - All colors are read from the holo-theme, so changes by themers will be obeyed. - The lower part of the pictures tries to illustrate the charge animation. Screenshot: http://dl.dropbox.com/u/16186798/cm10/cm-circle-bat-mockup.png Patchset 2: - Level >= 95% is treated as 100% (see inline comment) - paint.setDither(true) should reduce artifacts on 16bit color depth devices - modified tablet-specific xml. alignment should fit now (not tested yet) - cleaned up some xml formating derps - fixed possible crash bug PS3: 97% seems better than 95% for full circle Patchset 4+5: lost track of patchsets. Patchset 6: The battery fill-up above 97% was a quick shot. In the end, we show the right percentage in text, but circle fills up, once 97% is reached. This also solves the issue, that circle with very tiny gap looks slightly unbalanced. Also gave in about code formating. Its for the greater good. (I still am convinced, the whole world is wrong about this :) Patchset 7: - Fix derp Change-Id: I3dfe0b4e69c545cb9bbad2d1461d154618c60e00
- Loading branch information...
Showing with 420 additions and 12 deletions.
- +4 −2 core/java/android/provider/Settings.java
- +10 −0 packages/SystemUI/res/layout/status_bar.xml
- +9 −0 packages/SystemUI/res/layout/system_bar_notification_area.xml
- +9 −0 packages/SystemUI/res/layout/system_bar_notification_panel_title.xml
- +14 −5 packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java
- +362 −0 packages/SystemUI/src/com/android/systemui/statusbar/policy/CircleBattery.java
- +12 −5 packages/SystemUI/src/com/android/systemui/statusbar/policy/DockBatteryController.java
Oops, something went wrong.