From f8237aee940d7abfebb3895c4cce151b9a83f218 Mon Sep 17 00:00:00 2001 From: Riley Jones Date: Thu, 29 Feb 2024 21:43:46 +0000 Subject: [PATCH] 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 --- res/xml/accessibility_edit_shortcuts.xml | 112 +++++++++--------- .../EditShortcutsPreferenceFragment.java | 4 +- 2 files changed, 59 insertions(+), 57 deletions(-) diff --git a/res/xml/accessibility_edit_shortcuts.xml b/res/xml/accessibility_edit_shortcuts.xml index 8be0ee50857..fdb5b99a641 100644 --- a/res/xml/accessibility_edit_shortcuts.xml +++ b/res/xml/accessibility_edit_shortcuts.xml @@ -18,66 +18,68 @@ - + - + - + - + - + - + - - - - + + \ No newline at end of file diff --git a/src/com/android/settings/accessibility/shortcuts/EditShortcutsPreferenceFragment.java b/src/com/android/settings/accessibility/shortcuts/EditShortcutsPreferenceFragment.java index 5a3b13ab640..aba342a792e 100644 --- a/src/com/android/settings/accessibility/shortcuts/EditShortcutsPreferenceFragment.java +++ b/src/com/android/settings/accessibility/shortcuts/EditShortcutsPreferenceFragment.java @@ -207,9 +207,9 @@ public class EditShortcutsPreferenceFragment extends DashboardFragment { activity.setTitle(titles.first); - String categoryKey = activity.getResources().getString( + String screenDescriptionPrefKey = getString( R.string.accessibility_shortcut_description_pref); - findPreference(categoryKey).setTitle(titles.second); + findPreference(screenDescriptionPrefKey).setSummary(titles.second); } @NonNull