Set a tinting color for the image. By default, the tint will blend using SRC_ATOP
mode.
set tint using XML attribute:
android:tint="#009c38"
Note: Must be a color value, in the form of "#rgb"
, "#argb"
, "#rrggbb"
, or "#aarrggbb"
.
set tint programmatically:
imgExample.setColorFilter(Color.argb(255, 0, 156, 38));
and you can clear this color filter:
imgExample.clearColorFilter();
Example: