From 015e96cc95b09d9562f95dbb24f2ec8e5bbfa2d4 Mon Sep 17 00:00:00 2001 From: Andrei Stingaceanu Date: Fri, 5 Jun 2015 16:36:37 +0100 Subject: Floating toolbar old theme fix The floating toolbar now has it's own theming: * material_light used for all light themes * material_dark for dark themes The attributes are not public. Bug: 21177954 Change-Id: I7ccf9c677be44d510ab48168c0215d37456be059 --- .../res/res/drawable/floating_popup_background.xml | 23 ------------------ .../drawable/floating_popup_background_dark.xml | 23 ++++++++++++++++++ .../drawable/floating_popup_background_light.xml | 23 ++++++++++++++++++ core/res/res/drawable/ic_ab_back_material_dark.xml | 27 ++++++++++++++++++++++ .../res/res/drawable/ic_ab_back_material_light.xml | 27 ++++++++++++++++++++++ .../res/drawable/ic_menu_moreoverflow_material.xml | 1 + .../ic_menu_moreoverflow_material_dark.xml | 26 +++++++++++++++++++++ .../ic_menu_moreoverflow_material_light.xml | 26 +++++++++++++++++++++ .../item_background_borderless_material_dark.xml | 18 +++++++++++++++ .../item_background_borderless_material_light.xml | 19 +++++++++++++++ .../res/drawable/item_background_material_dark.xml | 22 ++++++++++++++++++ .../drawable/item_background_material_light.xml | 22 ++++++++++++++++++ .../floating_popup_close_overflow_button.xml | 4 ++-- core/res/res/layout/floating_popup_container.xml | 2 +- core/res/res/layout/floating_popup_menu_button.xml | 4 ++-- .../layout/floating_popup_menu_image_button.xml | 2 +- .../layout/floating_popup_open_overflow_button.xml | 4 ++-- .../layout/floating_popup_overflow_list_item.xml | 2 +- core/res/res/values/arrays.xml | 8 +++++++ core/res/res/values/attrs.xml | 11 +++++++++ core/res/res/values/themes.xml | 16 +++++++++++++ 21 files changed, 278 insertions(+), 32 deletions(-) delete mode 100644 core/res/res/drawable/floating_popup_background.xml create mode 100644 core/res/res/drawable/floating_popup_background_dark.xml create mode 100644 core/res/res/drawable/floating_popup_background_light.xml create mode 100644 core/res/res/drawable/ic_ab_back_material_dark.xml create mode 100644 core/res/res/drawable/ic_ab_back_material_light.xml create mode 100644 core/res/res/drawable/ic_menu_moreoverflow_material_dark.xml create mode 100644 core/res/res/drawable/ic_menu_moreoverflow_material_light.xml create mode 100644 core/res/res/drawable/item_background_borderless_material_dark.xml create mode 100644 core/res/res/drawable/item_background_borderless_material_light.xml create mode 100644 core/res/res/drawable/item_background_material_dark.xml create mode 100644 core/res/res/drawable/item_background_material_light.xml diff --git a/core/res/res/drawable/floating_popup_background.xml b/core/res/res/drawable/floating_popup_background.xml deleted file mode 100644 index b6700b3ab8b3..000000000000 --- a/core/res/res/drawable/floating_popup_background.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - diff --git a/core/res/res/drawable/floating_popup_background_dark.xml b/core/res/res/drawable/floating_popup_background_dark.xml new file mode 100644 index 000000000000..ded1137576de --- /dev/null +++ b/core/res/res/drawable/floating_popup_background_dark.xml @@ -0,0 +1,23 @@ + + + + + + + diff --git a/core/res/res/drawable/floating_popup_background_light.xml b/core/res/res/drawable/floating_popup_background_light.xml new file mode 100644 index 000000000000..9c7a8860dde7 --- /dev/null +++ b/core/res/res/drawable/floating_popup_background_light.xml @@ -0,0 +1,23 @@ + + + + + + + diff --git a/core/res/res/drawable/ic_ab_back_material_dark.xml b/core/res/res/drawable/ic_ab_back_material_dark.xml new file mode 100644 index 000000000000..7cdd1393a4a3 --- /dev/null +++ b/core/res/res/drawable/ic_ab_back_material_dark.xml @@ -0,0 +1,27 @@ + + + + + diff --git a/core/res/res/drawable/ic_ab_back_material_light.xml b/core/res/res/drawable/ic_ab_back_material_light.xml new file mode 100644 index 000000000000..65dab8112ef2 --- /dev/null +++ b/core/res/res/drawable/ic_ab_back_material_light.xml @@ -0,0 +1,27 @@ + + + + + diff --git a/core/res/res/drawable/ic_menu_moreoverflow_material.xml b/core/res/res/drawable/ic_menu_moreoverflow_material.xml index 502ad6910a32..3f534517e64b 100644 --- a/core/res/res/drawable/ic_menu_moreoverflow_material.xml +++ b/core/res/res/drawable/ic_menu_moreoverflow_material.xml @@ -1,3 +1,4 @@ + + + + diff --git a/core/res/res/drawable/ic_menu_moreoverflow_material_light.xml b/core/res/res/drawable/ic_menu_moreoverflow_material_light.xml new file mode 100644 index 000000000000..7af234fda2e4 --- /dev/null +++ b/core/res/res/drawable/ic_menu_moreoverflow_material_light.xml @@ -0,0 +1,26 @@ + + + + + diff --git a/core/res/res/drawable/item_background_borderless_material_dark.xml b/core/res/res/drawable/item_background_borderless_material_dark.xml new file mode 100644 index 000000000000..685c52a848c7 --- /dev/null +++ b/core/res/res/drawable/item_background_borderless_material_dark.xml @@ -0,0 +1,18 @@ + + + + diff --git a/core/res/res/drawable/item_background_borderless_material_light.xml b/core/res/res/drawable/item_background_borderless_material_light.xml new file mode 100644 index 000000000000..3ef6674c9326 --- /dev/null +++ b/core/res/res/drawable/item_background_borderless_material_light.xml @@ -0,0 +1,19 @@ + + + + diff --git a/core/res/res/drawable/item_background_material_dark.xml b/core/res/res/drawable/item_background_material_dark.xml new file mode 100644 index 000000000000..06eb531c5330 --- /dev/null +++ b/core/res/res/drawable/item_background_material_dark.xml @@ -0,0 +1,22 @@ + + + + + + + + diff --git a/core/res/res/drawable/item_background_material_light.xml b/core/res/res/drawable/item_background_material_light.xml new file mode 100644 index 000000000000..2f3d1577bb88 --- /dev/null +++ b/core/res/res/drawable/item_background_material_light.xml @@ -0,0 +1,22 @@ + + + + + + + + diff --git a/core/res/res/layout/floating_popup_close_overflow_button.xml b/core/res/res/layout/floating_popup_close_overflow_button.xml index 0dbf7f7ad866..4dae1aeb7ffe 100644 --- a/core/res/res/layout/floating_popup_close_overflow_button.xml +++ b/core/res/res/layout/floating_popup_close_overflow_button.xml @@ -20,6 +20,6 @@ android:layout_height="match_parent" android:minWidth="@dimen/floating_toolbar_menu_button_minimum_width" android:minHeight="@dimen/floating_toolbar_height" - android:src="?android:attr/actionModeCloseDrawable" + android:src="?attr/floatingToolbarCloseDrawable" android:contentDescription="@string/floating_toolbar_close_overflow_description" - android:background="?attr/selectableItemBackgroundBorderless" /> + android:background="?attr/floatingToolbarItemBackgroundBorderlessDrawable" /> diff --git a/core/res/res/layout/floating_popup_container.xml b/core/res/res/layout/floating_popup_container.xml index f37aee15ce0d..63dae4470cbe 100644 --- a/core/res/res/layout/floating_popup_container.xml +++ b/core/res/res/layout/floating_popup_container.xml @@ -24,4 +24,4 @@ android:elevation="2dp" android:focusable="true" android:focusableInTouchMode="true" - android:background="@drawable/floating_popup_background"/> + android:background="?attr/floatingToolbarPopupBackgroundDrawable"/> diff --git a/core/res/res/layout/floating_popup_menu_button.xml b/core/res/res/layout/floating_popup_menu_button.xml index b54919876997..1b58ce530c1f 100644 --- a/core/res/res/layout/floating_popup_menu_button.xml +++ b/core/res/res/layout/floating_popup_menu_button.xml @@ -30,5 +30,5 @@ android:fontFamily="sans-serif-medium" android:textSize="@dimen/floating_toolbar_text_size" android:textAllCaps="true" - android:textColor="?attr/colorForeground" - android:background="?attr/selectableItemBackground" /> + android:textColor="?attr/floatingToolbarForegroundColor" + android:background="?attr/floatingToolbarItemBackgroundDrawable" /> diff --git a/core/res/res/layout/floating_popup_menu_image_button.xml b/core/res/res/layout/floating_popup_menu_image_button.xml index 07eb7a3757b7..1ba784866f3a 100644 --- a/core/res/res/layout/floating_popup_menu_image_button.xml +++ b/core/res/res/layout/floating_popup_menu_image_button.xml @@ -32,5 +32,5 @@ android:paddingEnd="@dimen/floating_toolbar_menu_button_side_padding" android:paddingBottom="@dimen/floating_toolbar_menu_image_button_vertical_padding" android:scaleType="centerInside" - android:background="?attr/selectableItemBackground" /> + android:background="?attr/floatingToolbarItemBackgroundDrawable" /> diff --git a/core/res/res/layout/floating_popup_open_overflow_button.xml b/core/res/res/layout/floating_popup_open_overflow_button.xml index 30275652fe89..f6a3e8d3fbc1 100644 --- a/core/res/res/layout/floating_popup_open_overflow_button.xml +++ b/core/res/res/layout/floating_popup_open_overflow_button.xml @@ -24,6 +24,6 @@ android:paddingTop="0dp" android:paddingBottom="0dp" android:paddingEnd="4dp" - android:src="@drawable/ic_menu_moreoverflow_material" + android:src="?attr/floatingToolbarOpenDrawable" android:contentDescription="@string/floating_toolbar_open_overflow_description" - android:background="?attr/selectableItemBackgroundBorderless" /> + android:background="?attr/floatingToolbarItemBackgroundBorderlessDrawable" /> diff --git a/core/res/res/layout/floating_popup_overflow_list_item.xml b/core/res/res/layout/floating_popup_overflow_list_item.xml index 2ff45bb36a74..22f4e68b1e25 100644 --- a/core/res/res/layout/floating_popup_overflow_list_item.xml +++ b/core/res/res/layout/floating_popup_overflow_list_item.xml @@ -31,6 +31,6 @@ android:ellipsize="end" android:fontFamily="sans-serif-medium" android:textSize="@dimen/floating_toolbar_text_size" - android:textColor="?attr/colorForeground" + android:textColor="?attr/floatingToolbarForegroundColor" android:textAllCaps="true" /> diff --git a/core/res/res/values/arrays.xml b/core/res/res/values/arrays.xml index d5c2d197bf43..a3cc4aed214d 100644 --- a/core/res/res/values/arrays.xml +++ b/core/res/res/values/arrays.xml @@ -310,7 +310,11 @@ @drawable/fastscroll_label_right_material @drawable/fastscroll_thumb_material @drawable/fastscroll_track_material + @drawable/floating_popup_background_dark + @drawable/floating_popup_background_light @drawable/ic_ab_back_material + @drawable/ic_ab_back_material_dark + @drawable/ic_ab_back_material_light @drawable/ic_clear_material @drawable/ic_commit_search_api_material @drawable/ic_dialog_alert_material @@ -330,7 +334,11 @@ @drawable/ic_search_api_material @drawable/ic_voice_search_api_material @drawable/item_background_borderless_material + @drawable/item_background_borderless_material_dark + @drawable/item_background_borderless_material_light @drawable/item_background_material + @drawable/item_background_material_dark + @drawable/item_background_material_light @drawable/list_divider_material @drawable/list_section_divider_material @drawable/notification_material_action_background diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 52e2cf0c5999..c08d511a15a1 100644 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -549,6 +549,17 @@ {@link android.view.Window#setTransitionBackgroundFadeDuration(long)}. --> + + + + + + + + + + + diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml index ecf00f01b5ed..b7acdd44b82f 100644 --- a/core/res/res/values/themes.xml +++ b/core/res/res/values/themes.xml @@ -389,6 +389,14 @@ please see themes_device_defaults.xml. @style/SegmentedButton @drawable/ic_fingerprint + + @drawable/ic_ab_back_material_dark + @color/foreground_material_dark + @drawable/item_background_borderless_material_dark + @drawable/item_background_material_dark + @drawable/ic_menu_moreoverflow_material_dark + @drawable/floating_popup_background_dark + @style/Widget.Holo.SearchView @style/Theme.SearchBar @@ -538,6 +546,14 @@ please see themes_device_defaults.xml. @style/Widget.DeviceDefault.Light.MediaRouteButton @drawable/ic_find_next_holo_light @drawable/ic_find_previous_holo_light + + + @drawable/ic_ab_back_material_light + @color/foreground_material_light + @drawable/item_background_borderless_material_light + @drawable/item_background_material_light + @drawable/ic_menu_moreoverflow_material_light + @drawable/floating_popup_background_light -- cgit v1.2.3-59-g8ed1b