Skip to content

Commit

Permalink
Merge pull request #2 from JasonHezz/master
Browse files Browse the repository at this point in the history
make drawable mutable
  • Loading branch information
woxingxiao authored Oct 26, 2017
2 parents ec94dc6 + 6359c24 commit 36c8a2b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ private void initDrawables(Drawable... drawables) {
private void tintDrawable(Drawable drawable) {
if (drawable != null) {
if (isTintDrawableInTextColor) {
DrawableCompat.setTint(drawable, getCurrentTextColor());
DrawableCompat.setTint(drawable.mutate(), getCurrentTextColor());
} else if (mDrawableCompatColor != 0) {
DrawableCompat.setTint(drawable, mDrawableCompatColor);
DrawableCompat.setTint(drawable.mutate(), mDrawableCompatColor);
}
}
}
Expand Down

0 comments on commit 36c8a2b

Please sign in to comment.