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:
@@ -17,9 +17,11 @@
|
||||
package com.android.settings.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.Switch;
|
||||
|
||||
public class ToggleSwitch extends Switch {
|
||||
|
||||
private ToggleSwitch.OnBeforeCheckedChangeListener mOnBeforeListener;
|
||||
|
||||
public static interface OnBeforeCheckedChangeListener {
|
||||
@@ -30,6 +32,18 @@ public class ToggleSwitch extends Switch {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public ToggleSwitch(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public ToggleSwitch(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
public ToggleSwitch(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
}
|
||||
|
||||
public void setOnBeforeCheckedChangeListener(OnBeforeCheckedChangeListener listener) {
|
||||
mOnBeforeListener = listener;
|
||||
}
|
||||
|
Reference in New Issue
Block a user