Update more colors in Data Usage Summary
- use colors from the Settings Theme
- code cleaning for use the Theme accent color constant
instead of raw color value
Change-Id: I04ec913f0b8048b6e50069213e9d92992168fe18
diff --git a/res/layout/data_usage_chart.xml b/res/layout/data_usage_chart.xml
index cec2af2..76cfc6d 100644
--- a/res/layout/data_usage_chart.xml
+++ b/res/layout/data_usage_chart.xml
@@ -54,7 +54,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start|bottom"
- settings:strokeColor="#d88d3a"
+ settings:strokeColor="@color/theme_accent"
settings:fillColor="#c0ba7f3e"
settings:fillColorSecondary="#60ba7f3e" />
diff --git a/res/layout/data_usage_detail.xml b/res/layout/data_usage_detail.xml
index 6826764..3bca030 100644
--- a/res/layout/data_usage_detail.xml
+++ b/res/layout/data_usage_detail.xml
@@ -55,7 +55,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dip"
- android:textColor="#d88d3a"
+ android:textColor="@color/theme_accent"
android:text="@string/data_usage_label_foreground"
android:textAlignment="viewStart" />
@@ -63,7 +63,7 @@
android:id="@+id/app_foreground"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:textColor="#d88d3a"
+ android:textColor="@color/theme_accent"
android:textAlignment="viewStart" />
<TextView
diff --git a/res/values/colors.xml b/res/values/colors.xml
index e32d218..f46a800 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -46,7 +46,7 @@
<color name="lock_pattern_background">#00000000</color>
<color name="lock_pattern_view_regular_color">#ff37474f</color>
- <color name="lock_pattern_view_success_color">#ff009688</color>
+ <color name="lock_pattern_view_success_color">@color/theme_accent</color>
<color name="lock_pattern_view_error_color">#fff4511e</color>
<!-- Palette colors referenced by top-level themes. -->
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 26b0ef3..f143ebc 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -265,7 +265,7 @@
</style>
<style name="TextAppearance.CategoryTitle" parent="@android:style/TextAppearance.Material.Small">
- <item name="android:textColor">#FF009688</item>
+ <item name="android:textColor">@color/theme_accent</item>
</style>
<style name="TextAppearance.TileTitle" parent="@android:style/TextAppearance.Material.Medium">
diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java
index 86a73c2..1d41816 100644
--- a/src/com/android/settings/DataUsageSummary.java
+++ b/src/com/android/settings/DataUsageSummary.java
@@ -189,6 +189,9 @@
private static final int LOADER_CHART_DATA = 2;
private static final int LOADER_SUMMARY = 3;
+ private static final int FOREGROUND_BYTES_COLOR = 0xff009688;
+ private static final int DEFAULT_BYTES_COLOR = 0xffced7db;
+
private INetworkManagementService mNetworkService;
private INetworkStatsService mStatsService;
private NetworkPolicyManager mPolicyManager;
@@ -1176,8 +1179,8 @@
mAppPieChart.setOriginAngle(175);
mAppPieChart.removeAllSlices();
- mAppPieChart.addSlice(foregroundBytes, Color.parseColor("#d88d3a"));
- mAppPieChart.addSlice(defaultBytes, Color.parseColor("#666666"));
+ mAppPieChart.addSlice(foregroundBytes, FOREGROUND_BYTES_COLOR);
+ mAppPieChart.addSlice(defaultBytes, DEFAULT_BYTES_COLOR);
mAppPieChart.generatePath();