From 43d53432aa8ec30beac88e8db3fa2f472b740a96 Mon Sep 17 00:00:00 2001 From: Takeshi Hagikura Date: Wed, 9 Jun 2021 18:49:14 +0900 Subject: [PATCH] Update the colors of the tabs of work profile pagination Update the tab colors based on the discussion in the bug and the design mock. Rename the color/all_apps_tab_bg to color/all_apps_tab_background_selected to make the usage of the color explicit. (Confirmed it's only used for the color of the selected tab) Bug: 189488670 Test: Visual inspection Change-Id: I6ac38f71a8dd8852e1ab2e70f2f8434e9101daa1 --- .../all_apps_tab_background_selected.xml | 18 ++++++++++++++++++ res/color-night-v31/all_apps_tab_text.xml | 19 +++++++++++++++++++ .../all_apps_tabs_background.xml | 18 ++++++++++++++++++ .../all_apps_tab_background_selected.xml | 18 ++++++++++++++++++ res/color-night/all_apps_tab_text.xml | 19 +++++++++++++++++++ res/color-night/all_apps_tabs_background.xml | 18 ++++++++++++++++++ .../all_apps_tab_background_selected.xml | 18 ++++++++++++++++++ res/color-v31/all_apps_tab_text.xml | 19 +++++++++++++++++++ res/color-v31/all_apps_tabs_background.xml | 18 ++++++++++++++++++ ...l => all_apps_tab_background_selected.xml} | 5 ++--- res/color/all_apps_tab_text.xml | 4 ++-- res/color/all_apps_tabs_background.xml | 18 ++++++++++++++++++ res/drawable/all_apps_tabs_background.xml | 8 +++----- .../PersonalWorkSlidingTabStrip.java | 3 ++- 14 files changed, 192 insertions(+), 11 deletions(-) create mode 100644 res/color-night-v31/all_apps_tab_background_selected.xml create mode 100644 res/color-night-v31/all_apps_tab_text.xml create mode 100644 res/color-night-v31/all_apps_tabs_background.xml create mode 100644 res/color-night/all_apps_tab_background_selected.xml create mode 100644 res/color-night/all_apps_tab_text.xml create mode 100644 res/color-night/all_apps_tabs_background.xml create mode 100644 res/color-v31/all_apps_tab_background_selected.xml create mode 100644 res/color-v31/all_apps_tab_text.xml create mode 100644 res/color-v31/all_apps_tabs_background.xml rename res/color/{all_apps_tab_bg.xml => all_apps_tab_background_selected.xml} (83%) create mode 100644 res/color/all_apps_tabs_background.xml diff --git a/res/color-night-v31/all_apps_tab_background_selected.xml b/res/color-night-v31/all_apps_tab_background_selected.xml new file mode 100644 index 0000000000..b7c9ff64f2 --- /dev/null +++ b/res/color-night-v31/all_apps_tab_background_selected.xml @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/res/color-night-v31/all_apps_tab_text.xml b/res/color-night-v31/all_apps_tab_text.xml new file mode 100644 index 0000000000..83237b49e5 --- /dev/null +++ b/res/color-night-v31/all_apps_tab_text.xml @@ -0,0 +1,19 @@ + + + + + + \ No newline at end of file diff --git a/res/color-night-v31/all_apps_tabs_background.xml b/res/color-night-v31/all_apps_tabs_background.xml new file mode 100644 index 0000000000..b396f3377e --- /dev/null +++ b/res/color-night-v31/all_apps_tabs_background.xml @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/res/color-night/all_apps_tab_background_selected.xml b/res/color-night/all_apps_tab_background_selected.xml new file mode 100644 index 0000000000..b22bc8b673 --- /dev/null +++ b/res/color-night/all_apps_tab_background_selected.xml @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/res/color-night/all_apps_tab_text.xml b/res/color-night/all_apps_tab_text.xml new file mode 100644 index 0000000000..183af01f42 --- /dev/null +++ b/res/color-night/all_apps_tab_text.xml @@ -0,0 +1,19 @@ + + + + + + \ No newline at end of file diff --git a/res/color-night/all_apps_tabs_background.xml b/res/color-night/all_apps_tabs_background.xml new file mode 100644 index 0000000000..c0c1621d17 --- /dev/null +++ b/res/color-night/all_apps_tabs_background.xml @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/res/color-v31/all_apps_tab_background_selected.xml b/res/color-v31/all_apps_tab_background_selected.xml new file mode 100644 index 0000000000..dac8fa2994 --- /dev/null +++ b/res/color-v31/all_apps_tab_background_selected.xml @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/res/color-v31/all_apps_tab_text.xml b/res/color-v31/all_apps_tab_text.xml new file mode 100644 index 0000000000..c3520a7ab5 --- /dev/null +++ b/res/color-v31/all_apps_tab_text.xml @@ -0,0 +1,19 @@ + + + + + + \ No newline at end of file diff --git a/res/color-v31/all_apps_tabs_background.xml b/res/color-v31/all_apps_tabs_background.xml new file mode 100644 index 0000000000..30757b0b3c --- /dev/null +++ b/res/color-v31/all_apps_tabs_background.xml @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/res/color/all_apps_tab_bg.xml b/res/color/all_apps_tab_background_selected.xml similarity index 83% rename from res/color/all_apps_tab_bg.xml rename to res/color/all_apps_tab_background_selected.xml index e59e8d2198..5cb9bd8928 100644 --- a/res/color/all_apps_tab_bg.xml +++ b/res/color/all_apps_tab_background_selected.xml @@ -13,7 +13,6 @@ See the License for the specific language governing permissions and limitations under the License. --> - - + + \ No newline at end of file diff --git a/res/color/all_apps_tab_text.xml b/res/color/all_apps_tab_text.xml index 2db0fb5d74..dace3800cd 100644 --- a/res/color/all_apps_tab_text.xml +++ b/res/color/all_apps_tab_text.xml @@ -14,6 +14,6 @@ limitations under the License. --> - - + + \ No newline at end of file diff --git a/res/color/all_apps_tabs_background.xml b/res/color/all_apps_tabs_background.xml new file mode 100644 index 0000000000..a4b7d1f216 --- /dev/null +++ b/res/color/all_apps_tabs_background.xml @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/res/drawable/all_apps_tabs_background.xml b/res/drawable/all_apps_tabs_background.xml index a345dd3afc..4e953152d0 100644 --- a/res/drawable/all_apps_tabs_background.xml +++ b/res/drawable/all_apps_tabs_background.xml @@ -13,14 +13,12 @@ See the License for the specific language governing permissions and limitations under the License. --> - + + android:bottom="@dimen/all_apps_tabs_vertical_padding"> - + diff --git a/src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java b/src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java index 8f9cdc8a4c..be5822dca4 100644 --- a/src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java +++ b/src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java @@ -59,7 +59,8 @@ public class PersonalWorkSlidingTabStrip extends LinearLayout implements PageInd R.dimen.all_apps_header_pill_corner_radius); mSelectedIndicatorPaint = new Paint(); - mSelectedIndicatorPaint.setColor(context.getColor(R.color.all_apps_tab_bg)); + mSelectedIndicatorPaint.setColor( + context.getColor(R.color.all_apps_tab_background_selected)); mIsRtl = Utilities.isRtl(getResources()); }