I am super excited about the new possibility to set vector drawables to layouts using the app:srcCompat="@drawable/icon"
attribute introduced in support-library 23.2.0.
But I wonder how I can fetch one of this drawables programmatically or set is as background.
I thought about something like:
ContextCompat.getDrawable(context, R.drawable.icon)
Is this even possible?
createFromResource(Resource, id);
that should work. android.googlesource.com/platform/frameworks/support/+/34cbdb2/… – Bettinabettine