Tint
ImageViewCompat.setImageTintList(imageView, ContextCompat.getColorStateList(context, R.color.colorAccent))
Tips: Change tint color of ImageView
will effectively change the drawable color which is black color originally.
You can create a black color Material Vector Icon by File -> New -> Vector Asset -> Clip Art
, then assign the drawable to ImageView
by setImageResource(R.drawable.ic_add_black_24dp)
.
Color Filter
Make the image darker by applying black overlay with 70% opacity
imageView.setColorFilter(Color.argb((255 * 0.3).toInt(), 0, 0, 0))
Clear color filter
imageView.clearColorFilter()