ShortcutPreference Toggle design.
- For target SDK < 30 app show as preference item to trigger shortcut on/off. - For target SDK >= 30 app show two item: the left one can edit shortcut and the right one be a on/off trigger button. The design is reference from WIFI setting which has similar comportment. Bug: 148989269 Test: Test result in Buganizer. Change-Id: I815206d9e885c01bf3e6445820176aed4a743323
This commit is contained in:
@@ -43,7 +43,7 @@ public class LegacyAccessibilityServicePreferenceFragment extends
|
||||
final CharSequence hardwareTitle = getPrefContext().getText(
|
||||
R.string.accessibility_shortcut_edit_dialog_title_hardware);
|
||||
mShortcutPreference.setSummary(hardwareTitle);
|
||||
mShortcutPreference.setSettingsVisibility(View.GONE);
|
||||
mShortcutPreference.setSettingsEditable(false);
|
||||
|
||||
setAllowedPreferredShortcutType(UserShortcutType.HARDWARE);
|
||||
}
|
||||
|
Reference in New Issue
Block a user