Align the "Open activity" UI style with usual accessibility service "Use service"

Root Cause: "Open activity" Preference is not part of the widget SettingsMainSwitchBarPreference, so its UI style did not be inherited.

Solution: "Open activity" has different concept from switch bar, we need to manual set its bacground to comply with the SettingsLib style.

Bug: 207067203
Test: manual test
Change-Id: I66f63f6952e5c4770509febc0e53eca6dc6eedb9
This commit is contained in:
jasonwshsu
2021-11-22 19:57:47 +08:00
parent 0a8f978357
commit a8442468ad
2 changed files with 38 additions and 0 deletions

View File

@@ -150,6 +150,7 @@ public class LaunchAccessibilityActivityPreferenceFragment extends ToggleFeature
private void initLaunchPreference() {
final Preference launchPreference = new Preference(getPrefContext());
launchPreference.setLayoutResource(R.layout.accessibility_launch_activity_preference);
launchPreference.setKey(KEY_LAUNCH_PREFERENCE);
final AccessibilityShortcutInfo info = getAccessibilityShortcutInfo();