Q: Set vector drawable programmatically pre Lollipop Very common problem with a twist to which I couldn't find a solution for.
I am setting my vector programmatically. I want to be able to change the tint color programmatically too.
Found some solutions such as
Programmatically tint a Support Vector
ImageView iv = ....
Drawable d = VectorDrawableCompat.create(getResources(), R.drawable.ic_exit_to_app_24dp, null);
d = DrawableCompat.wrap(d);
DrawableCompat.setTint(d, headerTitleColor);
iv.setImageDrawable(d);

The main problem comes with 
iv.setImageDrawable(d);

I found that prelolipop only accepts setting view's drawable with
iv.setImageResource(int resource)

I couldn't find any solutions for setting it with a drawable file.

A: Use AppCompatImageView which has setImageDrawable() method.
