From 5f503b87eac6f9fccf7bff93055e9d2a3b7c94c0 Mon Sep 17 00:00:00 2001 From: Yanting Yang Date: Fri, 21 Feb 2020 18:00:48 +0800 Subject: [PATCH] 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 thing that the user can interact with. It's a no-op when the user clicks on the whole preference view. Mark the ClearDefaultsPreference as unselectable can fix the talkback issue for the user clicking on the preference view outside of the button. In the meantime, the button of ClearDefaultsPreference has not applied the button style of Settings yet. Also fixed it by using the ActionPrimaryButton style of Settings. Fixes: 146471192 Test: visual and robotests Change-Id: Ife215d0901bd9fc3055495b0495ba175ed0dfa26 Merged-In: Ife215d0901bd9fc3055495b0495ba175ed0dfa26 (cherry picked from commit b9bcbddc4658636df1b3571747ed886b0240e0fa) --- res/layout/app_preferred_settings.xml | 3 ++- res/xml/installed_app_launch_settings.xml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/res/layout/app_preferred_settings.xml b/res/layout/app_preferred_settings.xml index 1f3b497e127..b3343f5e394 100644 --- a/res/layout/app_preferred_settings.xml +++ b/res/layout/app_preferred_settings.xml @@ -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" /> diff --git a/res/xml/installed_app_launch_settings.xml b/res/xml/installed_app_launch_settings.xml index 6cf1955ad45..b77794984de 100644 --- a/res/xml/installed_app_launch_settings.xml +++ b/res/xml/installed_app_launch_settings.xml @@ -38,7 +38,8 @@ android:title="@string/app_launch_other_defaults_title"> + android:key="app_launch_clear_defaults" + android:selectable="false"/>