Set Tint Color Of ImageView (Support Library)

April 22, 2018
Change color of icon using Tint Color
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).

This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.