diff options
author | Andrew Sapperstein <asapperstein@google.com> | 2016-06-20 12:48:22 -0700 |
---|---|---|
committer | Andrew Sapperstein <asapperstein@google.com> | 2016-06-30 14:17:19 -0700 |
commit | 5f7750d75c83b13facf57988e1f042ce8af9abd6 (patch) | |
tree | b5ae3fe17a2ce8de81bf56ff33ffeb4d0af17573 /res/values | |
parent | 26def23702881867208bfc465af27a4f9afc26f6 (diff) | |
download | android_packages_apps_Trebuchet-5f7750d75c83b13facf57988e1f042ce8af9abd6.tar.gz android_packages_apps_Trebuchet-5f7750d75c83b13facf57988e1f042ce8af9abd6.tar.bz2 android_packages_apps_Trebuchet-5f7750d75c83b13facf57988e1f042ce8af9abd6.zip |
Use colorSecondary for darker bg color.
Used for widget headers and a few other places.
In order to support pre-API 25, an app-local version of colorSecondary
is created and used throughout the app. A new WidgetContainerTheme
sets colorSecondary to a canned value. On API 25+, colorSecondary
is set to the platform value.
Change-Id: Ie0dd66333052b7346eea5d82d1c88417c6a2cd00
Fixes: 28625102
Diffstat (limited to 'res/values')
-rw-r--r-- | res/values/attrs.xml | 3 | ||||
-rw-r--r-- | res/values/colors.xml | 4 | ||||
-rw-r--r-- | res/values/styles.xml | 9 |
3 files changed, 14 insertions, 2 deletions
diff --git a/res/values/attrs.xml b/res/values/attrs.xml index ca28ad35f..21a05c065 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -82,4 +82,7 @@ <declare-styleable name="ButtonDropTarget"> <attr name="hideParentOnDisable" format="boolean" /> </declare-styleable> + + <!-- Fallback attr for pre-API 25 support --> + <attr name="colorSecondary" format="reference|color" /> </resources> diff --git a/res/values/colors.xml b/res/values/colors.xml index 44e77e22b..1af449c03 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -34,7 +34,6 @@ <color name="quantum_panel_text_color">#FF666666</color> <color name="quantum_panel_bg_color">#FFF5F5F5</color> - <color name="quantum_panel_bg_color_dark">#FF374248</color> <color name="outline_color">#FFFFFFFF</color> @@ -44,4 +43,7 @@ <!-- Widgets view --> <color name="widgets_view_section_text_color">#FFFFFF</color> <color name="widgets_view_item_text_color">#C4C4C4</color> + + <!-- Used as a fallback since colorSecondary doesn't exist pre-API 25 --> + <color name="fallback_secondary_color">#FF37474F</color> </resources> diff --git a/res/values/styles.xml b/res/values/styles.xml index 0bfd0a041..8ea772b9f 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -30,12 +30,19 @@ <style name="Theme" parent="@style/LauncherTheme"></style> + <!-- Theme for the widget container. Overridden on API 25. --> + <style name="WidgetContainerTheme" parent="@android:style/Theme.DeviceDefault.Settings"> + <item name="colorSecondary">@color/fallback_secondary_color</item> + </style> + <!-- Overscroll effect --> + <style name="CustomOverscroll" /> + <style name="CustomOverscroll.Light" parent="@android:style/Theme.DeviceDefault.Light"> <item name="android:colorEdgeEffect">@color/folder_edge_effect_color</item> </style> - <style name="CustomOverscroll.Dark" parent="@android:style/Theme.DeviceDefault"> + <style name="CustomOverscroll.Dark"> <item name="android:colorEdgeEffect">@color/workspace_edge_effect_color</item> </style> |