To achieve this, you must use ImageViewCompat#setImageTintList() . In API 21+, it will use ImageView#setImageTintList() , as you would expect ... and in earlier versions of the platform, it will delegate to AppCompatImageView , which provides an implementation with backported support.
ColorStateList csl = AppCompatResources.getColorStateList(context, R.color.my_color_state_list); ImageViewCompat.setImageTintList(imageView, csl);
source share