From d5d5e22715c19c361d264693929c15c4325e80fa Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Tue, 7 Feb 2017 13:11:17 -0800 Subject: [PATCH] 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 --- res/drawable/quantum_panel_dark.xml | 22 ---------- ..._shape_dark.xml => round_rect_primary.xml} | 5 +-- res/layout/add_item_confirmation_activity.xml | 10 ++--- res/layout/all_apps.xml | 2 +- res/layout/appwidget_error.xml | 5 ++- res/layout/widget_cell.xml | 12 +++--- .../widget_list_divider.xml} | 10 ++--- res/layout/widgets_list_row_view.xml | 10 ++--- res/layout/widgets_view.xml | 3 +- res/{values-v25 => values-v26}/styles.xml | 4 +- res/values/attrs.xml | 3 -- res/values/colors.xml | 6 --- res/values/styles.xml | 12 ++---- src/com/android/launcher3/IconCache.java | 7 ++-- .../launcher3/PendingAppWidgetHostView.java | 4 +- src/com/android/launcher3/Utilities.java | 6 ++- .../launcher3/widget/WidgetsListAdapter.java | 40 ++++++++++++------- 17 files changed, 68 insertions(+), 93 deletions(-) delete mode 100644 res/drawable/quantum_panel_dark.xml rename res/drawable/{quantum_panel_shape_dark.xml => round_rect_primary.xml} (89%) rename res/{drawable/widgets_row_divider.xml => layout/widget_list_divider.xml} (69%) rename res/{values-v25 => values-v26}/styles.xml (84%) diff --git a/res/drawable/quantum_panel_dark.xml b/res/drawable/quantum_panel_dark.xml deleted file mode 100644 index b113b376f8..0000000000 --- a/res/drawable/quantum_panel_dark.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - diff --git a/res/drawable/quantum_panel_shape_dark.xml b/res/drawable/round_rect_primary.xml similarity index 89% rename from res/drawable/quantum_panel_shape_dark.xml rename to res/drawable/round_rect_primary.xml index b299eb8047..2c47e06536 100644 --- a/res/drawable/quantum_panel_shape_dark.xml +++ b/res/drawable/round_rect_primary.xml @@ -16,7 +16,6 @@ --> - - + + diff --git a/res/layout/add_item_confirmation_activity.xml b/res/layout/add_item_confirmation_activity.xml index da079da773..2aae5bc88d 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"> @@ -33,7 +33,7 @@ + android:theme="@style/AllAppsOverscroll" /> diff --git a/res/layout/widget_cell.xml b/res/layout/widget_cell.xml index c5a6753515..b9b098c3c3 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"> - - - - + \ 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 530e856144..5c2e230945 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 @@ + android:showDividers="none"/> diff --git a/res/layout/widgets_view.xml b/res/layout/widgets_view.xml index d193a5ef43..2f11c285d6 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"> diff --git a/res/values-v25/styles.xml b/res/values-v26/styles.xml similarity index 84% rename from res/values-v25/styles.xml rename to res/values-v26/styles.xml index ed670a9d3e..6877623d69 100644 --- a/res/values-v25/styles.xml +++ b/res/values-v26/styles.xml @@ -1,7 +1,7 @@ diff --git a/res/values/attrs.xml b/res/values/attrs.xml index a259362002..18f409f343 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -80,9 +80,6 @@ - - - diff --git a/res/values/colors.xml b/res/values/colors.xml index a7b507c268..d166a79250 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -45,11 +45,5 @@ #40FFFFFF #FFF - - #3B3B3B - - - #FF37474F - #757575 diff --git a/res/values/styles.xml b/res/values/styles.xml index 8ffc53fd76..879c7d8d65 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -46,20 +46,16 @@ - - -