From 4cccc20ec80ce0854bc1859c95cab6f642d1cdba Mon Sep 17 00:00:00 2001 From: Alexandre Elias Date: Wed, 11 May 2022 16:23:57 -0700 Subject: [PATCH] Improve SearchView & secondary text accessibility Conforming to the current version of the Material.io spec: - Secondary text opacity increased slightly from 0.54 to 0.60 - Hint opacity is increased to the same level as secondary opacity. - Also, hint pressed state no longer increases opacity (since the next higher tier of opacity is primary, this would be confusing). - Expand padding on SearchView close button to have a size of 48x48 Bug: 141212776 Bug: 230697814 Test: CtsThemeHostTestCases.android.theme.cts.ThemeHostTest#testThemes Test: "Verified textfield hint opacity increased in 'Talkback tests 14: Single line edit field'" Change-Id: I95a682c98a61e3d8ea0ff7f33c0bbd2a4267f67c --- core/res/res/color/hint_foreground_material_dark.xml | 6 +----- core/res/res/color/hint_foreground_material_light.xml | 6 +----- core/res/res/layout/search_view.xml | 4 ++-- core/res/res/values/colors_material.xml | 8 +------- 4 files changed, 5 insertions(+), 19 deletions(-) diff --git a/core/res/res/color/hint_foreground_material_dark.xml b/core/res/res/color/hint_foreground_material_dark.xml index 5cc9559525244..66fcb041dd7a5 100644 --- a/core/res/res/color/hint_foreground_material_dark.xml +++ b/core/res/res/color/hint_foreground_material_dark.xml @@ -15,10 +15,6 @@ --> - - diff --git a/core/res/res/color/hint_foreground_material_light.xml b/core/res/res/color/hint_foreground_material_light.xml index f7465e0e51397..63dd3b0131cab 100644 --- a/core/res/res/color/hint_foreground_material_light.xml +++ b/core/res/res/color/hint_foreground_material_light.xml @@ -15,10 +15,6 @@ --> - - diff --git a/core/res/res/layout/search_view.xml b/core/res/res/layout/search_view.xml index 0c462fda9235b..39034dc616202 100644 --- a/core/res/res/layout/search_view.xml +++ b/core/res/res/layout/search_view.xml @@ -96,8 +96,8 @@ android:id="@+id/search_close_btn" android:layout_width="wrap_content" android:layout_height="match_parent" - android:paddingStart="8dip" - android:paddingEnd="8dip" + android:paddingStart="12dip" + android:paddingEnd="12dip" android:layout_gravity="center_vertical" android:background="?attr/selectableItemBackgroundBorderless" android:focusable="true" diff --git a/core/res/res/values/colors_material.xml b/core/res/res/values/colors_material.xml index d357f01027779..ea6e1f182fbff 100644 --- a/core/res/res/values/colors_material.xml +++ b/core/res/res/values/colors_material.xml @@ -65,18 +65,12 @@ #b3ffffff - 0.50 - 0.38 - - 0.70 - 0.54 - 0.26 0.30 1 0.87 .7 - 0.54 + 0.60 0.10 0.10