diff --git a/lib/java/com/google/android/material/checkbox/MaterialCheckBox.java b/lib/java/com/google/android/material/checkbox/MaterialCheckBox.java index 4e44ff28f10..d48db00688b 100644 --- a/lib/java/com/google/android/material/checkbox/MaterialCheckBox.java +++ b/lib/java/com/google/android/material/checkbox/MaterialCheckBox.java @@ -471,6 +471,10 @@ public void setErrorShown(boolean errorShown) { } this.errorShown = errorShown; refreshDrawableState(); + // This is needed due to a pre-21 bug where the drawable states don't get updated correctly. + if (VERSION.SDK_INT < VERSION_CODES.LOLLIPOP && buttonIconDrawable != null) { + buttonIconDrawable.jumpToCurrentState(); + } for (OnErrorChangedListener listener : onErrorChangedListeners) { listener.onErrorChanged(this, this.errorShown); }