mRedDotIv.setImageDrawable(tintDrawable(mRedDotIv.getDrawable(), ColorStateList.valueOf(0xFFFF4242)));
private Drawable tintDrawable(Drawable drawable, ColorStateList colorStateList) {
Drawable wrappedDrawable = DrawableCompat.wrap(drawable);
DrawableCompat.setTintList(wrappedDrawable, colorStateList);
return wrappedDrawable;
}
网友评论