From 7158e6299210d08f82c29135c001652508b79dfb Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Fri, 30 May 2014 17:59:27 -0700 Subject: [PATCH] Tweak battery usage to match red lines. Most of this is done, the main thing missing is the color of the bars which seems like a framework issue. Note that this introduces a change to the global theme making colorControlActivated the specified blue color, which impacts all of the settings UI. (Except apparently progress bars, and thus the bug.) Change-Id: I4a5ca8c3b94dc23b8f065f60fe697ee0e76ff47d --- res/drawable/data_usage_bar.xml | 25 +-- res/layout/app_percentage_item.xml | 8 +- res/layout/battery_history_chart.xml | 35 +++ res/layout/preference_batteryhistory.xml | 33 ++- res/values/attrs.xml | 6 + res/values/colors.xml | 4 + res/values/strings.xml | 14 +- res/values/themes.xml | 2 + .../fuelgauge/BatteryHistoryChart.java | 211 ++++++++++-------- .../fuelgauge/BatteryHistoryDetail.java | 2 +- .../fuelgauge/BatteryHistoryPreference.java | 14 ++ .../settings/fuelgauge/PowerUsageSummary.java | 13 +- 12 files changed, 237 insertions(+), 130 deletions(-) create mode 100644 res/layout/battery_history_chart.xml diff --git a/res/drawable/data_usage_bar.xml b/res/drawable/data_usage_bar.xml index 96f1caedd0e..b98dfb66a86 100644 --- a/res/drawable/data_usage_bar.xml +++ b/res/drawable/data_usage_bar.xml @@ -1,5 +1,5 @@ - + + + diff --git a/res/layout/preference_batteryhistory.xml b/res/layout/preference_batteryhistory.xml index a09c6a876e8..766ec51c8c9 100644 --- a/res/layout/preference_batteryhistory.xml +++ b/res/layout/preference_batteryhistory.xml @@ -1,5 +1,5 @@ - - - + + + + diff --git a/res/values/attrs.xml b/res/values/attrs.xml index 3ad03752924..c1cb5ae4c3b 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -43,6 +43,12 @@ + + + + + + diff --git a/res/values/colors.xml b/res/values/colors.xml index 8a2c1f55f29..b0a6fa93ba7 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -57,6 +57,10 @@ #ffffab40 #ffff9100 + #FF009688 + #FF80CBC4 + #FFCED7DB + #ff263238 #ffe1e1e0 #ff384248 diff --git a/res/values/strings.xml b/res/values/strings.xml index 86ca704b732..a950559183a 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -3529,8 +3529,18 @@ %2$s %1$d%% - - %2$s - (%3$s until full) + %2$s until full + + %1$d%% - + %2$s until full on AC + + %1$d%% - + %2$s until full over USB + + %1$d%% - + %2$s until full from wireless + + Use since last full charge Battery use since unplugged diff --git a/res/values/themes.xml b/res/values/themes.xml index 366492d9f65..ecc9a20b3c7 100644 --- a/res/values/themes.xml +++ b/res/values/themes.xml @@ -91,6 +91,8 @@ @color/quantum_orange_A200 @style/Theme.ActionBar + + @color/quantum_accent_color_light