summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2017-02-07 13:11:17 -0800
committerSunny Goyal <sunnygoyal@google.com>2017-02-09 10:16:22 -0800
commitd5d5e22715c19c361d264693929c15c4325e80fa (patch)
treede664e7f61c2088de817483d57860a83a1f87228 /res
parentdb7b82960a54b85510aaeba2f543b37b4dc59fc8 (diff)
downloadandroid_packages_apps_Trebuchet-d5d5e22715c19c361d264693929c15c4325e80fa.tar.gz
android_packages_apps_Trebuchet-d5d5e22715c19c361d264693929c15c4325e80fa.tar.bz2
android_packages_apps_Trebuchet-d5d5e22715c19c361d264693929c15c4325e80fa.zip
Updating widget tray theme
Using standard theme attributes rather than custom color codes, so that it plays nice with system theme changes. Bug: 34819119 Bug: 34897402 Bug: 21446746 Change-Id: I265fba3ceae8873650fd09e4704838d313155e83
Diffstat (limited to 'res')
-rw-r--r--res/drawable/quantum_panel_dark.xml22
-rw-r--r--res/drawable/round_rect_primary.xml (renamed from res/drawable/quantum_panel_shape_dark.xml)5
-rw-r--r--res/layout/add_item_confirmation_activity.xml10
-rw-r--r--res/layout/all_apps.xml2
-rw-r--r--res/layout/appwidget_error.xml5
-rw-r--r--res/layout/widget_cell.xml12
-rw-r--r--res/layout/widget_list_divider.xml (renamed from res/drawable/widgets_row_divider.xml)10
-rw-r--r--res/layout/widgets_list_row_view.xml10
-rw-r--r--res/layout/widgets_view.xml3
-rw-r--r--res/values-v26/styles.xml (renamed from res/values-v25/styles.xml)4
-rw-r--r--res/values/attrs.xml3
-rw-r--r--res/values/colors.xml6
-rw-r--r--res/values/styles.xml12
13 files changed, 32 insertions, 72 deletions
diff --git a/res/drawable/quantum_panel_dark.xml b/res/drawable/quantum_panel_dark.xml
deleted file mode 100644
index b113b376f..000000000
--- a/res/drawable/quantum_panel_dark.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2015 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.
--->
-<inset xmlns:android="http://schemas.android.com/apk/res/android"
- android:drawable="@drawable/quantum_panel_shape_dark"
- android:insetBottom="@dimen/quantum_panel_outer_padding"
- android:insetLeft="@dimen/quantum_panel_outer_padding"
- android:insetRight="@dimen/quantum_panel_outer_padding"
- android:insetTop="@dimen/quantum_panel_outer_padding" />
diff --git a/res/drawable/quantum_panel_shape_dark.xml b/res/drawable/round_rect_primary.xml
index b299eb804..2c47e0653 100644
--- a/res/drawable/quantum_panel_shape_dark.xml
+++ b/res/drawable/round_rect_primary.xml
@@ -16,7 +16,6 @@
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
- <solid android:color="?attr/colorSecondary" />
- <corners
- android:radius="2dp" />
+ <solid android:color="?android:attr/colorPrimary" />
+ <corners android:radius="2dp" />
</shape>
diff --git a/res/layout/add_item_confirmation_activity.xml b/res/layout/add_item_confirmation_activity.xml
index da079da77..2aae5bc88 100644
--- a/res/layout/add_item_confirmation_activity.xml
+++ b/res/layout/add_item_confirmation_activity.xml
@@ -22,10 +22,10 @@
android:layout_height="match_parent">
<TextView
- android:paddingLeft="16dp"
- android:paddingRight="16dp"
- android:paddingTop="8dp"
- android:paddingBottom="8dp"
+ android:paddingLeft="24dp"
+ android:paddingRight="24dp"
+ android:paddingTop="4dp"
+ android:paddingBottom="20dp"
android:text="@string/add_item_request_drag_hint"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
@@ -33,7 +33,7 @@
<FrameLayout
android:theme="@style/WidgetContainerTheme"
android:layout_width="match_parent"
- android:background="?android:attr/colorPrimary"
+ android:background="?android:attr/colorPrimaryDark"
android:layout_height="wrap_content">
<include
diff --git a/res/layout/all_apps.xml b/res/layout/all_apps.xml
index 1909f3b54..5f5b38b46 100644
--- a/res/layout/all_apps.xml
+++ b/res/layout/all_apps.xml
@@ -55,7 +55,7 @@
android:focusable="true"
android:paddingStart="@dimen/container_fastscroll_thumb_max_width"
android:paddingEnd="@dimen/container_fastscroll_thumb_max_width"
- android:theme="@style/CustomOverscroll.Light" />
+ android:theme="@style/AllAppsOverscroll" />
<!-- Fast scroller popup -->
<TextView
diff --git a/res/layout/appwidget_error.xml b/res/layout/appwidget_error.xml
index d6bd0c51c..6a459c3fb 100644
--- a/res/layout/appwidget_error.xml
+++ b/res/layout/appwidget_error.xml
@@ -19,9 +19,10 @@
android:layout_height="match_parent"
android:gravity="center"
android:elevation="2dp"
+ android:padding="4dp"
android:theme="@style/WidgetContainerTheme"
- android:background="@drawable/quantum_panel_dark"
+ android:background="@drawable/round_rect_primary"
android:textAppearance="?android:attr/textAppearanceMediumInverse"
- android:textColor="@color/widgets_view_item_text_color"
+ android:textColor="?android:attr/textColorSecondary"
android:text="@string/gadget_error_text"
/>
diff --git a/res/layout/widget_cell.xml b/res/layout/widget_cell.xml
index c5a675351..b9b098c3c 100644
--- a/res/layout/widget_cell.xml
+++ b/res/layout/widget_cell.xml
@@ -20,7 +20,7 @@
android:layout_weight="1"
android:orientation="vertical"
android:focusable="true"
- android:background="?android:attr/colorPrimary"
+ android:background="?android:attr/colorPrimaryDark"
android:gravity="center_horizontal">
<LinearLayout
@@ -42,10 +42,9 @@
android:fadingEdge="horizontal"
android:fontFamily="sans-serif-condensed"
android:gravity="start"
- android:shadowColor="#B0000000"
- android:shadowRadius="2.0"
android:singleLine="true"
- android:textColor="@color/widgets_view_item_text_color"
+ android:maxLines="1"
+ android:textColor="?android:attr/textColorSecondary"
android:textSize="14sp" />
<!-- The original dimensions of the widget (can't be the same text as above due to different
@@ -56,11 +55,10 @@
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginLeft="5dp"
- android:textColor="@color/widgets_view_item_text_color"
+ android:textColor="?android:attr/textColorSecondary"
android:textSize="14sp"
android:fontFamily="sans-serif-condensed"
- android:shadowRadius="2.0"
- android:shadowColor="#B0000000" />
+ android:alpha="0.8" />
</LinearLayout>
<!-- The image of the widget. This view does not support padding. Any placement adjustment
diff --git a/res/drawable/widgets_row_divider.xml b/res/layout/widget_list_divider.xml
index 2c3c7a255..68c9a4500 100644
--- a/res/drawable/widgets_row_divider.xml
+++ b/res/layout/widget_list_divider.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- Copyright (C) 2017 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.
@@ -13,7 +13,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<shape xmlns:android="http://schemas.android.com/apk/res/android" >
- <size android:width="@dimen/widget_row_divider" />
- <solid android:color="?attr/colorSecondary" />
-</shape>
+<View xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="@dimen/widget_row_divider"
+ android:layout_height="match_parent"
+ android:background="?android:attr/colorPrimary" /> \ No newline at end of file
diff --git a/res/layout/widgets_list_row_view.xml b/res/layout/widgets_list_row_view.xml
index 530e85614..5c2e23094 100644
--- a/res/layout/widgets_list_row_view.xml
+++ b/res/layout/widgets_list_row_view.xml
@@ -19,7 +19,6 @@
android:id="@+id/widgets_cell_list_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="?android:attr/colorPrimary"
android:orientation="vertical"
android:focusable="true"
android:descendantFocusability="afterDescendants">
@@ -30,7 +29,7 @@
android:id="@+id/section"
android:layout_width="match_parent"
android:layout_height="@dimen/widget_section_height"
- android:background="?attr/colorSecondary"
+ android:background="?android:attr/colorPrimary"
android:drawablePadding="@dimen/widget_section_horizontal_padding"
android:ellipsize="end"
android:focusable="true"
@@ -51,9 +50,9 @@
<HorizontalScrollView
android:id="@+id/widgets_scroll_container"
- android:theme="@style/CustomOverscroll.Dark"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:background="?android:attr/colorPrimaryDark"
android:scrollbars="none">
<LinearLayout
android:id="@+id/widgets_cell_list"
@@ -62,7 +61,6 @@
android:paddingStart="@dimen/widget_row_padding"
android:paddingEnd="0dp"
android:orientation="horizontal"
- android:divider="@drawable/widgets_row_divider"
- android:showDividers="middle"/>
+ android:showDividers="none"/>
</HorizontalScrollView>
</LinearLayout>
diff --git a/res/layout/widgets_view.xml b/res/layout/widgets_view.xml
index d193a5ef4..2f11c285d 100644
--- a/res/layout/widgets_view.xml
+++ b/res/layout/widgets_view.xml
@@ -23,7 +23,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:descendantFocusability="afterDescendants"
- launcher:revealBackground="@drawable/quantum_panel_shape_dark"
+ launcher:revealBackground="@drawable/round_rect_primary"
android:theme="@style/WidgetContainerTheme">
<View
@@ -45,7 +45,6 @@
<com.android.launcher3.widget.WidgetsRecyclerView
android:id="@+id/widgets_list_view"
- android:theme="@style/CustomOverscroll.Dark"
android:layout_width="match_parent"
android:layout_height="match_parent" />
diff --git a/res/values-v25/styles.xml b/res/values-v26/styles.xml
index ed670a9d3..6877623d6 100644
--- a/res/values-v25/styles.xml
+++ b/res/values-v26/styles.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
-* Copyright (C) 2016 The Android Open Source Project
+* Copyright (C) 2017 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.
@@ -19,6 +19,6 @@
<resources>
<!-- Theme for the widget container. -->
<style name="WidgetContainerTheme" parent="@android:style/Theme.DeviceDefault.Settings">
- <item name="colorSecondary">?android:attr/colorSecondary</item>
+ <item name="android:colorEdgeEffect">?android:attr/textColorSecondary</item>
</style>
</resources>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index a25936200..18f409f34 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -80,9 +80,6 @@
<attr name="hideParentOnDisable" format="boolean" />
</declare-styleable>
- <!-- Fallback attr for pre-API 25 support -->
- <attr name="colorSecondary" format="reference|color" />
-
<declare-styleable name="InvariantDeviceProfile">
<attr name="name" format="string" />
<attr name="minWidthDps" format="float" />
diff --git a/res/values/colors.xml b/res/values/colors.xml
index a7b507c26..d166a7925 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -45,11 +45,5 @@
<color name="spring_loaded_panel_color">#40FFFFFF</color>
<color name="spring_loaded_highlighted_panel_border_color">#FFF</color>
- <!-- Widgets view -->
- <color name="widgets_view_item_text_color">#3B3B3B</color>
-
- <!-- Used as a fallback since colorSecondary doesn't exist pre-API 25 -->
- <color name="fallback_secondary_color">#FF37474F</color>
-
<color name="notification_icon_default_color">#757575</color> <!-- Gray 600 -->
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 8ffc53fd7..879c7d8d6 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -46,20 +46,16 @@
<!-- 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>
+ <item name="android:colorEdgeEffect">@color/workspace_edge_effect_color</item>
+ <item name="android:textColorPrimary">?android:attr/textColorPrimaryInverse</item>
+ <item name="android:textColorSecondary">?android:attr/textColorSecondaryInverse</item>
</style>
<!-- Overscroll effect -->
- <style name="CustomOverscroll" />
-
- <style name="CustomOverscroll.Light" parent="@android:style/Theme.DeviceDefault.Light">
+ <style name="AllAppsOverscroll" parent="@android:style/Theme.DeviceDefault.Light">
<item name="android:colorEdgeEffect">@color/folder_edge_effect_color</item>
</style>
- <style name="CustomOverscroll.Dark">
- <item name="android:colorEdgeEffect">@color/workspace_edge_effect_color</item>
- </style>
-
<!-- Different icons -->
<style name="Icon">
<item name="android:layout_width">match_parent</item>