With the new android support update, vector drawables get backward compatibility. I have a vector image with various paths. I want the color of the paths to change on click
The color of the whole vector can be changed using setTint.
You have to set up your ImageView in your layout file as this:
Then to change the color of your image:
DrawableCompat.setTint(myImageView.getDrawable(), ContextCompat.getColor(context, R.color.another_nice_color));
Note: myImageView.getDrawable() gives nullpointerexception if the vector drawable is set to the imageView as background.