summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Sapperstein <asapperstein@google.com>2016-05-29 13:54:30 -0700
committerAndrew Sapperstein <asapperstein@google.com>2016-06-21 15:48:54 -0700
commite9399248165589933cd4a0be63abe74da0204ade (patch)
tree1c60b5e3e4396447ebcd288a4cce14eb77bf028a
parent681ca3e6f0ed6e20ae2af8821c18abb81930e270 (diff)
downloadandroid_packages_apps_EmergencyInfo-e9399248165589933cd4a0be63abe74da0204ade.tar.gz
android_packages_apps_EmergencyInfo-e9399248165589933cd4a0be63abe74da0204ade.tar.bz2
android_packages_apps_EmergencyInfo-e9399248165589933cd4a0be63abe74da0204ade.zip
Refactor EmergencyInfo theme colors.
Introduces stock colors (primary_color, primary_dark_color, etc) to allow overriding the colors via resource overlays. Also updated ic_add_24dp.xml to use colorAccent instead of a hardcoded tint color. BUG: 29004404 Change-Id: I13900cf25d5153a2a22acf8945f307c5eb6b28c7
-rw-r--r--res/drawable/ic_add_24dp.xml2
-rw-r--r--res/layout/custom_action_bar.xml2
-rw-r--r--res/values/colors.xml8
-rw-r--r--res/values/styles.xml14
4 files changed, 18 insertions, 8 deletions
diff --git a/res/drawable/ic_add_24dp.xml b/res/drawable/ic_add_24dp.xml
index 45fa9a9..329c515 100644
--- a/res/drawable/ic_add_24dp.xml
+++ b/res/drawable/ic_add_24dp.xml
@@ -18,7 +18,7 @@
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
- android:tint="#009688">
+ android:tint="?attr/colorAccent">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
diff --git a/res/layout/custom_action_bar.xml b/res/layout/custom_action_bar.xml
index 04bebf8..89370b5 100644
--- a/res/layout/custom_action_bar.xml
+++ b/res/layout/custom_action_bar.xml
@@ -22,6 +22,6 @@
android:elevation="@dimen/tab_elevation"
android:minHeight="@dimen/action_bar_size"
android:popupTheme="@style/ThemeOverlay.AppCompat.Light"
- android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
+ android:theme="@style/ActionBarThemeOverlay"
android:titleMarginStart="16dp"
android:titleTextColor="@color/tab_text_color" /> \ No newline at end of file
diff --git a/res/values/colors.xml b/res/values/colors.xml
index de826ca..d821d1f 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -18,7 +18,11 @@
<color name="emergency_primary">#E53935</color>
<color name="emergency_accent">#FFFF00</color>
<color name="tab_text_color">#FFFFFF</color>
- <color name="material_teal_200">#FF80CBC4</color>
<color name="white_with_alpha">#B2FFFFFF</color>
<color name="hint_text_color">#36000000</color>
-</resources> \ No newline at end of file
+
+ <color name="primary_color">@color/material_blue_grey_900</color>
+ <color name="primary_dark_color">@color/material_blue_grey_950</color>
+ <color name="accent_color_light">@color/accent_material_light</color>
+ <color name="accent_color_dark">@color/accent_material_dark</color>
+</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 0789306..9c23c42 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -14,11 +14,12 @@
limitations under the License.
-->
<resources>
- <style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
+ <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:preferenceCategoryStyle">@style/AppTheme.PreferenceCategoryStyle</item>
- <item name="colorPrimary">@color/material_blue_grey_900</item>
- <item name="colorPrimaryDark">@color/material_blue_grey_950</item>
- <item name="tabIndicatorColor">@color/material_teal_200</item>
+ <item name="colorPrimary">@color/primary_color</item>
+ <item name="colorPrimaryDark">@color/primary_dark_color</item>
+ <item name="colorAccent">@color/accent_color_light</item>
+ <item name="tabIndicatorColor">@color/accent_color_dark</item>
<item name="android:datePickerStyle">@style/AppTheme.DatePickerStyle</item>
</style>
<!-- Base emergency theme. -->
@@ -30,6 +31,11 @@
<item name="tabIndicatorColor">@color/emergency_accent</item>
</style>
+ <!-- ActionBar -->
+ <style name="ActionBarThemeOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
+ <item name="colorAccent">@color/accent_color_dark</item>
+ </style>
+
<!-- Tabs -->
<style name="AppTheme.TabLayout" parent="Widget.Design.TabLayout">
<item name="tabTextAppearance">@style/AppTheme.TabText</item>