material icon indicating copy to clipboard operation
material copied to clipboard

Switch

Open ljesparis opened this issue 9 years ago • 1 comments

the switch cannot be disable...

ljesparis avatar Jan 09 '16 04:01 ljesparis

You can try this:

public class DisabledSwitch extends Switch {
    public DisabledSwitch(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public boolean onTouchEvent(@NonNull MotionEvent event) {
        return false;
    }
}

AlekseiPecherei avatar Jun 30 '17 07:06 AlekseiPecherei