Animations with Vector Drawable in android

Animations with Vector Drawable in android
What is Vector Drawable (Vector Image) :

In Android 5.0 (API Level 21) and above, you can define vector drawables, which scale without losing definition. You need only one asset file for a vector image, as opposed to an asset file for each screen density in the case of bitmap images. To create a vector image, you define the details of the shape inside a <vector> XML element.

In sort Vector image is a scalable so, you need only one image for all resolution device in place of traditional way of coping multiple images for single image for respected resolution folder.

You can use Vector Assets Studio in Android Studio 2.0 for material icons vector image :
http://developer.android.com/tools/help/vector-asset-studio.html
follow the above link for that. 

Here i am going to show the demo of how to use Vector Drawable and do animation with it : 
Animations are used : 
- Scale animation
Rotation animation
- Transition Animation
- ObjectAnimator
- ValueAnimator








Check out the full demo here : https://github.com/CDL24/VectorDrawableAnimation

Just download and import full android studio project.

And if you like my efforts please share the blog and hits like Happy Coding ;)

Comments