summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorAndrew Sapperstein <asapperstein@google.com>2016-07-01 03:11:20 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-07-01 03:11:20 +0000
commit3da982fbabd5027bb4f927ff66a8ec336722a3af (patch)
tree0efb22121a9c8667acb72c3f967b03a7bb6770f2 /res
parent5a2af756ea9ca3e557978021c7c4b75f79d50d9e (diff)
parent5f7750d75c83b13facf57988e1f042ce8af9abd6 (diff)
downloadandroid_packages_apps_Trebuchet-3da982fbabd5027bb4f927ff66a8ec336722a3af.tar.gz
android_packages_apps_Trebuchet-3da982fbabd5027bb4f927ff66a8ec336722a3af.tar.bz2
android_packages_apps_Trebuchet-3da982fbabd5027bb4f927ff66a8ec336722a3af.zip
Merge "Use colorSecondary for darker bg color." into ub-launcher3-calgary
Diffstat (limited to 'res')
-rw-r--r--res/drawable/quantum_panel_shape_dark.xml4
-rw-r--r--res/drawable/widgets_row_divider.xml2
-rw-r--r--res/layout/widgets_list_row_view.xml2
-rw-r--r--res/layout/widgets_view.xml2
-rw-r--r--res/values-v25/styles.xml24
-rw-r--r--res/values/attrs.xml3
-rw-r--r--res/values/colors.xml4
-rw-r--r--res/values/styles.xml9
8 files changed, 43 insertions, 7 deletions
diff --git a/res/drawable/quantum_panel_shape_dark.xml b/res/drawable/quantum_panel_shape_dark.xml
index c3821c416..b299eb804 100644
--- a/res/drawable/quantum_panel_shape_dark.xml
+++ b/res/drawable/quantum_panel_shape_dark.xml
@@ -16,7 +16,7 @@
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
- <solid android:color="@color/quantum_panel_bg_color_dark" />
+ <solid android:color="?attr/colorSecondary" />
<corners
android:radius="2dp" />
-</shape> \ No newline at end of file
+</shape>
diff --git a/res/drawable/widgets_row_divider.xml b/res/drawable/widgets_row_divider.xml
index bb5b6b55b..2c3c7a255 100644
--- a/res/drawable/widgets_row_divider.xml
+++ b/res/drawable/widgets_row_divider.xml
@@ -15,5 +15,5 @@
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<size android:width="@dimen/widget_row_divider" />
- <solid android:color="@color/quantum_panel_bg_color_dark" />
+ <solid android:color="?attr/colorSecondary" />
</shape>
diff --git a/res/layout/widgets_list_row_view.xml b/res/layout/widgets_list_row_view.xml
index c0219b96f..4687b3891 100644
--- a/res/layout/widgets_list_row_view.xml
+++ b/res/layout/widgets_list_row_view.xml
@@ -30,7 +30,7 @@
android:id="@+id/section"
android:layout_width="match_parent"
android:layout_height="@dimen/widget_section_height"
- android:background="@color/quantum_panel_bg_color_dark"
+ android:background="?attr/colorSecondary"
android:drawablePadding="@dimen/widget_section_horizontal_padding"
android:ellipsize="end"
android:focusable="true"
diff --git a/res/layout/widgets_view.xml b/res/layout/widgets_view.xml
index e9bbd37da..74f7ca10b 100644
--- a/res/layout/widgets_view.xml
+++ b/res/layout/widgets_view.xml
@@ -26,7 +26,7 @@
android:paddingBottom="@dimen/container_bounds_inset"
android:descendantFocusability="afterDescendants"
launcher:revealBackground="@drawable/quantum_panel_shape_dark"
- android:theme="@android:style/Theme.DeviceDefault.Settings">
+ android:theme="@style/WidgetContainerTheme">
<View
android:id="@+id/reveal_view"
diff --git a/res/values-v25/styles.xml b/res/values-v25/styles.xml
new file mode 100644
index 000000000..ed670a9d3
--- /dev/null
+++ b/res/values-v25/styles.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+* Copyright (C) 2016 The Android Open Source Project
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+-->
+<resources>
+ <!-- Theme for the widget container. -->
+ <style name="WidgetContainerTheme" parent="@android:style/Theme.DeviceDefault.Settings">
+ <item name="colorSecondary">?android:attr/colorSecondary</item>
+ </style>
+</resources>
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 a1ba0b0b5..3e827a643 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>