We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61da0fd commit 467d629Copy full SHA for 467d629
core/java/android/widget/Switch.java
@@ -833,6 +833,10 @@ public void toggle() {
833
public void setChecked(boolean checked) {
834
super.setChecked(checked);
835
836
+ // Calling the super method may result in setChecked() getting called
837
+ // recursively with a different value, so load the REAL value...
838
+ checked = isChecked();
839
+
840
if (isAttachedToWindow() && isLaidOut()) {
841
animateThumbToCheckedState(checked);
842
} else {
0 commit comments