//上下兼容的方法
private Drawable tintDrawable(int drawableId, int colorId) {
Drawable icon = getResources().getDrawable(drawableId);
Drawable tintIcon = DrawableCompat.wrap(icon);
DrawableCompat.setTintList(tintIcon, getResources().getColorStateList(colorId));
imageView.setImageDrawable(tintIcon);
return tintIcon;
}
ImageView tint 着色器,修改图片颜色值
最新推荐文章于 2024-05-24 08:30:00 发布