summaryrefslogtreecommitdiff
path: root/core/java/android/widget/CompoundButton.java
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2014-10-28 14:41:36 -0700
committerAlan Viverette <alanv@google.com>2014-10-29 19:46:54 +0000
commitd5133792391443521dc15f7da7de5d280e6703dd (patch)
tree61dfd88ec02dc4ff1afe499c2c4e918fa990d8ae /core/java/android/widget/CompoundButton.java
parente2502eb9ad5eafc54ae06f06a72493748616dbd5 (diff)
Update drawable state after updating tint list
BUG: 18155988 Change-Id: Ic536027a54c10b2082fbc22476530165b76e2c59
Diffstat (limited to 'core/java/android/widget/CompoundButton.java')
-rw-r--r--core/java/android/widget/CompoundButton.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/java/android/widget/CompoundButton.java b/core/java/android/widget/CompoundButton.java
index 092e31c5a6b4..447ccc2692a2 100644
--- a/core/java/android/widget/CompoundButton.java
+++ b/core/java/android/widget/CompoundButton.java
@@ -315,6 +315,12 @@ public abstract class CompoundButton extends Button implements Checkable {
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());
+ }
}
}