public void setCheckedImmediately ( boolean checked ) { if ( mChecked != checked ) { mChecked = checked ; if ( mOnCheckedChangeListener != null ) mOnCheckedChangeListener . onCheckedChanged ( this , mChecked ) ; } mThumbPosition = mChecked ? 1f : 0f ; invalidate ( ) ; }
Change the checked state of this Switch immediately without showing animation .