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
This commit is contained in:
Fabrice Di Meglio
2014-06-18 12:49:35 -07:00
parent e5c75ab44b
commit 6ebcc36514
5 changed files with 10 additions and 7 deletions

View File

@@ -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" />

View File

@@ -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

View File

@@ -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. -->

View File

@@ -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">

View File

@@ -189,6 +189,9 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable
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 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable
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();