Skip to content

Commit

Permalink
make drawable mutable
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonHezz committed Oct 26, 2017
1 parent ec94dc6 commit 6359c24
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 6359c24

Please sign in to comment.