Change EditShortcutsPreferenceFragment to use a Preference for subtitle/description
Replaces PreferenceCategory with unselectable Preference to better match desired visuals Screenshot at https://x20web.corp.google.com/users/jo/jonesriley/dragToEdit/editScreenWithSubtitle.png Flag: N/A Test: N/A Bug: 323388734 Change-Id: Ia1b333bc246ea4dd98070a646d5a8a1716ccbcee
This commit is contained in:
@@ -18,8 +18,12 @@
|
|||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:settings="http://schemas.android.com/apk/res-auto">
|
xmlns:settings="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<PreferenceCategory
|
<Preference
|
||||||
android:key="@string/accessibility_shortcut_description_pref">
|
android:key="@string/accessibility_shortcut_description_pref"
|
||||||
|
android:persistent="false"
|
||||||
|
android:selectable="false"
|
||||||
|
settings:allowDividerAbove="false"
|
||||||
|
settings:allowDividerBelow="false"/>
|
||||||
|
|
||||||
<com.android.settings.accessibility.shortcuts.ShortcutOptionPreference
|
<com.android.settings.accessibility.shortcuts.ShortcutOptionPreference
|
||||||
android:key="@string/accessibility_shortcut_fab_pref"
|
android:key="@string/accessibility_shortcut_fab_pref"
|
||||||
@@ -78,6 +82,4 @@
|
|||||||
settings:allowDividerAbove="false"
|
settings:allowDividerAbove="false"
|
||||||
settings:allowDividerBelow="false"
|
settings:allowDividerBelow="false"
|
||||||
settings:controller="com.android.settings.accessibility.shortcuts.TripleTapShortcutOptionController" />
|
settings:controller="com.android.settings.accessibility.shortcuts.TripleTapShortcutOptionController" />
|
||||||
</PreferenceCategory>
|
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
@@ -207,9 +207,9 @@ public class EditShortcutsPreferenceFragment extends DashboardFragment {
|
|||||||
|
|
||||||
activity.setTitle(titles.first);
|
activity.setTitle(titles.first);
|
||||||
|
|
||||||
String categoryKey = activity.getResources().getString(
|
String screenDescriptionPrefKey = getString(
|
||||||
R.string.accessibility_shortcut_description_pref);
|
R.string.accessibility_shortcut_description_pref);
|
||||||
findPreference(categoryKey).setTitle(titles.second);
|
findPreference(screenDescriptionPrefKey).setSummary(titles.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
|
|||||||
Reference in New Issue
Block a user