Use SwitchBar for Accessibility Settings
Deals with Talkback / Captions / Magnification Gestures
- follow up CL to 4193776698
Related to bug #14898161 On/Off switches must move down from Action Bar
Change-Id: Ibda0ed05b399f1b2b4464c5b22a3e9fd3d378867
This commit is contained in:
@@ -33,7 +33,7 @@ import java.util.ArrayList;
|
||||
|
||||
public class SwitchBar extends LinearLayout implements CompoundButton.OnCheckedChangeListener {
|
||||
|
||||
private Switch mSwitch;
|
||||
private ToggleSwitch mSwitch;
|
||||
private TextView mTextView;
|
||||
|
||||
private ArrayList<OnSwitchChangeListener> mSwitchChangeListeners =
|
||||
@@ -69,7 +69,7 @@ public class SwitchBar extends LinearLayout implements CompoundButton.OnCheckedC
|
||||
mTextView = (TextView) findViewById(R.id.switch_text);
|
||||
mTextView.setText(R.string.switch_off_text);
|
||||
|
||||
mSwitch = (Switch) findViewById(R.id.switch_widget);
|
||||
mSwitch = (ToggleSwitch) findViewById(R.id.switch_widget);
|
||||
mSwitch.setOnCheckedChangeListener(this);
|
||||
|
||||
addOnSwitchChangeListener(new OnSwitchChangeListener() {
|
||||
@@ -86,7 +86,7 @@ public class SwitchBar extends LinearLayout implements CompoundButton.OnCheckedC
|
||||
setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
public Switch getSwitch() {
|
||||
public ToggleSwitch getSwitch() {
|
||||
return mSwitch;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user