这两种实现有什么区别?
DrawableCompat.setTintMode(wrappedDrawable, Mode.SRC_ATOP);
DrawableCompat.setTint(wrappedDrawable, color);
和
drawable.setColorFilter(color, Mode.SRC_ATOP);
答案 0 :(得分:0)
setTint
将特定wrapedDrawable的色调设置为int
,而setTintMode
将特定wrappedDrawable的色调设置为ColorStateList
类型。
drawable.setColorFilter
设置了一个滤镜,但该方法不一定向后兼容。