VectorDrawable - is it available somehow for pre-Lollipop versions of Android?

You can try this support library. It supports VectorDrawable and AnimatedVectorDrawable introduced in Lollipop with fully backwards compatibility.


UPDATE ON March 2016

By Android Support Library 23.2.1 update, Support Vector Drawables and Animated Vector Drawables. (you can also use latestone for the same)

Please update version of a library in gradle file.

compile 'com.android.support:recyclerview-v7:23.2.1'

Vector drawables allow you to replace multiple png assets with a single vector graphic, defined in XML. While previously limited to Lollipop and higher devices, both VectorDrawable and AnimatedVectorDrawable are now available through two new Support Libraries support-vector-drawable and animated-vector-drawable. new app:srcCompat attribute to reference vector drawables .

Check source on github with some sample examples.

Changes for v7 appcompat library:

Reverted dependency on vector assets so that developers using the appcompat library are not forced to use VectorDrawable and its associated build flags.


Update 2: They enable it again in Support Library 23.4.0:

For AppCompat users, we’ve added an opt-in API to re-enable support Vector Drawables from resources (the behavior found in 23.2) via AppCompatDelegate.setCompatVectorFromResourcesEnabled(true) - keep in mind that this still can cause issues with memory usage and problems updating Configuration instances, hence why it is disabled by default.

Check this 23.4.0 available now

Update: This doesn't work from version 23.3.0 Check here for details. Proxy drawables don't work. app:srcCompat and setImageResource() work, however.


Vector Drawable support is available from the Support Library of version 23.2 and beyond. However, to properly use those drawables, they must be referenced indirectly.

First step would be to bump the AppCompat version.

compile 'com.android.support:appcompat-v7:23.2.0'

Second enable Vector Drawable support. If using Gradle plugin, 2.0+

android {  
   defaultConfig {  
     vectorDrawables.useSupportLibrary = true  
   }  
}

Otherwise

android {  
   defaultConfig {  
     generatedDensities = []  
   }  

   aaptOptions {  
     additionalParameters "--no-version-vectors"  
   }  
}

Third, refer to the linked answer.