Merge "Switch widget: Fix ON/OFF option update error"

This commit is contained in:
Jean-Baptiste Queru
2012-08-20 14:28:32 -07:00
committed by android code review

View File

@@ -675,7 +675,7 @@ public class Switch extends CompoundButton {
@Override
public void setChecked(boolean checked) {
super.setChecked(checked);
mThumbPosition = checked ? getThumbScrollRange() : 0;
mThumbPosition = isChecked() ? getThumbScrollRange() : 0;
invalidate();
}