summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Shubham Basu <basushubham@google.com> 2021-08-19 15:16:53 -0700
committer Shubham Basu <basushubham@google.com> 2021-08-25 22:51:00 +0000
commitb2b7c1638851dd6b0cab3a679f37e70630f6e082 (patch)
treefef1da0aa5acac8161d0fb4e23ce5cce097e8050
parent5cbf244872a3e97cd81688444ce9b9a9c172efa6 (diff)
fix: work profile tab color change
Bug: 196857669 Test: Manual Screenshots: https://screenshot.googleplex.com/3DTu9W5HDpyjDcT.png https://screenshot.googleplex.com/62WaGteGFKMDiWx.png Pre-S screenshots: https://screenshot.googleplex.com/4eNaiNUq68bLzst.png https://screenshot.googleplex.com/7YRhEHpTfpiQRwA.png Change-Id: I837752ec67198387ca79c816612ce7c2c7f4c30d
-rw-r--r--res/color/profile_tab_selector.xml4
-rw-r--r--res/layout/directory_header.xml2
-rw-r--r--res/values-night-v31/colors.xml12
-rw-r--r--res/values-v31/colors.xml13
-rw-r--r--res/values/colors.xml5
5 files changed, 27 insertions, 9 deletions
diff --git a/res/color/profile_tab_selector.xml b/res/color/profile_tab_selector.xml
index cbf03ccd1..53aef1f6a 100644
--- a/res/color/profile_tab_selector.xml
+++ b/res/color/profile_tab_selector.xml
@@ -17,7 +17,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_selected="true"
- android:color="?android:attr/colorAccent"/>
+ android:color="@color/profile_tab_selected_color"/>
<item
- android:color="@color/tab_default_background_color"/>
+ android:color="@color/profile_tab_default_color"/>
</selector>
diff --git a/res/layout/directory_header.xml b/res/layout/directory_header.xml
index 93e8b545c..4d602ac33 100644
--- a/res/layout/directory_header.xml
+++ b/res/layout/directory_header.xml
@@ -52,7 +52,7 @@
app:tabIndicatorHeight="@dimen/tab_selector_indicator_height"
app:tabSelectedTextColor="@color/tab_selected_text_color"
app:tabTextAppearance="@style/TabTextAppearance"
- app:tabTextColor="?android:attr/textColorSecondary"/>
+ app:tabTextColor="@color/tab_unselected_text_color"/>
<View
android:id="@+id/tab_separator"
android:layout_width="match_parent"
diff --git a/res/values-night-v31/colors.xml b/res/values-night-v31/colors.xml
index 16fe83890..61e9b1016 100644
--- a/res/values-night-v31/colors.xml
+++ b/res/values-night-v31/colors.xml
@@ -15,9 +15,6 @@
<resources>
<color name="tab_selected_text_color">@android:color/black</color>
- <color name="tab_default_background_color">
- @*android:color/system_neutral1_800
- </color> <!-- neutral 800 -->
<color name="work_profile_button_stroke_color">
@*android:color/system_accent1_200
</color> <!-- accent 200 -->
@@ -26,4 +23,13 @@
<color name="empty_state_message_text">@*android:color/system_neutral2_200
</color>
<!-- neutral variant 200 -->
+ <color name="tab_unselected_text_color">@*android:color/system_neutral2_200
+ </color>
+ <!-- neutral variant 200 -->
+ <color name="profile_tab_default_color">@*android:color/system_neutral1_800
+ </color>
+ <!-- neutral 800 -->
+ <color name="profile_tab_selected_color">@*android:color/system_neutral2_100
+ </color>
+ <!-- neutral variant 100 -->
</resources>
diff --git a/res/values-v31/colors.xml b/res/values-v31/colors.xml
index dfa603628..b01d8780f 100644
--- a/res/values-v31/colors.xml
+++ b/res/values-v31/colors.xml
@@ -14,7 +14,12 @@
-->
<resources>
- <color name="tab_selected_text_color">@android:color/white</color>
+ <color name="tab_selected_text_color">@*android:color/system_neutral1_900
+ </color>
+ <!-- neutral 900 -->
+ <color name="tab_unselected_text_color">@*android:color/system_neutral2_700
+ </color>
+ <!-- neutral variant 700-->
<color name="work_profile_button_stroke_color">
@*android:color/system_accent1_600
</color> <!-- primary 600 -->
@@ -23,4 +28,10 @@
<color name="empty_state_message_text">@*android:color/system_neutral2_700
</color>
<!-- neutral variant 700 -->
+ <color name="profile_tab_selected_color">@*android:color/system_accent1_100
+ </color>
+ <!-- accent 100 -->
+ <color name="profile_tab_default_color">@*android:color/system_neutral1_100
+ </color>
+ <!-- neutral 100 -->
</resources>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 032a5605d..1b4eabaaf 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -55,7 +55,8 @@
<color name="color_surface_header">@color/app_background_color</color>
<color name="tab_selected_text_color">@color/primary</color>
- <color name="tab_default_background_color">#E0E0E0</color>
-
<color name="work_profile_button_stroke_color">@color/primary</color>
+ <color name="profile_tab_selected_color">?android:attr/colorAccent</color>
+ <color name="profile_tab_default_color">#E0E0E0</color>
+ <color name="tab_unselected_text_color">#5F6368</color> <!-- Gray 700 -->
</resources>