glomadrian / material-animated-switch

A material Switch with icon animations and color transitions
1.18k stars 158 forks source link

how to disable switch? #18

Open macdonaldj opened 8 years ago

macdonaldj commented 8 years ago

my hack work around for this is to subclass and override this:

@Override public boolean onTouchEvent(MotionEvent event) { if(isEnabled()) { super.onTouchEvent(event); return true; } else { return false; } }

still need to figure out how to gray out the switch itself