Set ClearDefaultsPreference as unselectable for talkback

ClearDefaultsPreference is a customized preference which contains a
TextView and a Button. In reality, the button is the only interaction
way to users. There are no more interaction when user click the whole
preference view.

Mark the ClearDefaultsPreference as unselectable can fix the talkback
issue for user clicking the preference view out of button.

In the meantime, the button of ClearDefaultsPreference is not yet to
apply the button style of Settings. Also fix it with ActionPrimaryButton
style of Settings.

Fixes: 146471192
Test: visual and robotests
Change-Id: Ife215d0901bd9fc3055495b0495ba175ed0dfa26
This commit is contained in:
Yanting Yang
2020-02-21 18:00:48 +08:00
parent 2717067230
commit b9bcbddc46
2 changed files with 4 additions and 2 deletions

View File

@@ -35,6 +35,7 @@
android:layout_marginStart="-4dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/clear_activities" />
android:text="@string/clear_activities"
style="@style/ActionPrimaryButton" />
</LinearLayout>

View File

@@ -38,7 +38,8 @@
android:title="@string/app_launch_other_defaults_title">
<com.android.settings.applications.ClearDefaultsPreference
android:key="app_launch_clear_defaults"/>
android:key="app_launch_clear_defaults"
android:selectable="false"/>
</PreferenceCategory>