commit | d5133792391443521dc15f7da7de5d280e6703dd | [log] [tgz] |
---|---|---|
author | Alan Viverette <alanv@google.com> | Tue Oct 28 14:41:36 2014 -0700 |
committer | Alan Viverette <alanv@google.com> | Wed Oct 29 19:46:54 2014 +0000 |
tree | 61dfd88ec02dc4ff1afe499c2c4e918fa990d8ae | |
parent | e2502eb9ad5eafc54ae06f06a72493748616dbd5 [diff] [blame] |
Update drawable state after updating tint list BUG: 18155988 Change-Id: Ic536027a54c10b2082fbc22476530165b76e2c59
diff --git a/core/java/android/widget/CompoundButton.java b/core/java/android/widget/CompoundButton.java index 092e31c..447ccc2 100644 --- a/core/java/android/widget/CompoundButton.java +++ b/core/java/android/widget/CompoundButton.java
@@ -315,6 +315,12 @@ if (mHasButtonTintMode) { mButtonDrawable.setTintMode(mButtonTintMode); } + + // The drawable (or one of its children) may not have been + // stateful before applying the tint, so let's try again. + if (mButtonDrawable.isStateful()) { + mButtonDrawable.setState(getDrawableState()); + } } }