Accessibility Service & Shortcut Redesign - Primary action - toggle button design

Implements DividerSwitchPreference to replace ToggleSwitch

Bug: 142528112
Test: Manual test

Change-Id: I0d80d16bfa941f7ee333a2c5680a25a26c42809d
This commit is contained in:
menghanli
2020-02-03 22:12:45 +08:00
parent da645144e0
commit 6eb3912f31
17 changed files with 246 additions and 156 deletions

View File

@@ -60,10 +60,13 @@ import java.util.Set;
import java.util.StringJoiner;
import java.util.stream.Collectors;
/**
* Fragment that shows the actual UI for providing basic magnification accessibility service setup
* and does not have toggle bar to turn on service to use.
*/
public class ToggleScreenMagnificationPreferenceFragment extends
ToggleFeaturePreferenceFragment {
private static final String SETTINGS_KEY = "screen_magnification_settings";
private static final String EXTRA_SHORTCUT_TYPE = "shortcut_type";
private static final String KEY_SHORTCUT_PREFERENCE = "shortcut_preference";
private TouchExplorationStateChangeListener mTouchExplorationStateChangeListener;
@@ -429,11 +432,9 @@ public class ToggleScreenMagnificationPreferenceFragment extends
}
@Override
protected void onInstallSwitchBarToggleSwitch() {
super.onInstallSwitchBarToggleSwitch();
// Magnify is temporary-use app which uses shortcut to magnify screen, not by toggle.
mSwitchBar.hide();
protected void onInstallSwitchPreferenceToggleSwitch() {
super.onInstallSwitchPreferenceToggleSwitch();
mToggleServiceDividerSwitchPreference.setVisible(false);
}
@Override