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
This commit is contained in:
@@ -15,10 +15,6 @@
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="true"
|
||||
android:state_pressed="true"
|
||||
android:alpha="@dimen/hint_pressed_alpha_material_dark"
|
||||
android:color="@color/foreground_material_dark" />
|
||||
<item android:alpha="@dimen/hint_alpha_material_dark"
|
||||
<item android:alpha="@dimen/secondary_content_alpha_material_dark"
|
||||
android:color="@color/foreground_material_dark" />
|
||||
</selector>
|
||||
|
||||
@@ -15,10 +15,6 @@
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="true"
|
||||
android:state_pressed="true"
|
||||
android:alpha="@dimen/hint_pressed_alpha_material_light"
|
||||
android:color="@color/foreground_material_light" />
|
||||
<item android:alpha="@dimen/hint_alpha_material_light"
|
||||
<item android:alpha="@dimen/secondary_content_alpha_material_light"
|
||||
android:color="@color/foreground_material_light" />
|
||||
</selector>
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -65,18 +65,12 @@
|
||||
<!-- 70% white -->
|
||||
<color name="secondary_text_default_material_dark">#b3ffffff</color>
|
||||
|
||||
<item name="hint_alpha_material_dark" format="float" type="dimen">0.50</item>
|
||||
<item name="hint_alpha_material_light" format="float" type="dimen">0.38</item>
|
||||
|
||||
<item name="hint_pressed_alpha_material_dark" format="float" type="dimen">0.70</item>
|
||||
<item name="hint_pressed_alpha_material_light" format="float" type="dimen">0.54</item>
|
||||
|
||||
<item name="disabled_alpha_material_light" format="float" type="dimen">0.26</item>
|
||||
<item name="disabled_alpha_material_dark" format="float" type="dimen">0.30</item>
|
||||
<item name="primary_content_alpha_material_dark" format="float" type="dimen">1</item>
|
||||
<item name="primary_content_alpha_material_light" format="float" type="dimen">0.87</item>
|
||||
<item name="secondary_content_alpha_material_dark" format="float" type="dimen">.7</item>
|
||||
<item name="secondary_content_alpha_material_light" format="float" type="dimen">0.54</item>
|
||||
<item name="secondary_content_alpha_material_light" format="float" type="dimen">0.60</item>
|
||||
|
||||
<item name="highlight_alpha_material_light" format="float" type="dimen">0.10</item>
|
||||
<item name="highlight_alpha_material_dark" format="float" type="dimen">0.10</item>
|
||||
|
||||
Reference in New Issue
Block a user