Android and playing SVG animation

android animated vector drawable example
android path animation example
svg animation android github
android animated-vector drawable loop
android animated icons library
android canvas animation
android morph animation
android animation xml

I'm writing an Android application and I'd like to play a simple SVG animation. I'm aware that Android does not offer SVG support; what are my options here?

Starting from Android Lollipop (API level 21) it is possible to implement using AnimatedVectorDrawable.

There are also tools that will help to animate vector drawable shapeshifter and blog post from the author of the tool shapeshifter An Introduction to Icon Animation Techniques.

Play with animated vector drawable on Android - Andy Wang, From the material design icons, I picked the NFC icon since I can use it later in my apps. Material design NFC icon <svg height="24  - 9VAe gives you powerful tools to create smooth 2D vector morphing animation. - You can make "1 Picture Animation" with only one drawing picture. - Import SVG / WMF graphics and export SVG / GIF keyframe animation. - You can add texts, photos, animation objects in your animation. - 9VAe provides Hand-draw Writing, Blur, Shadow, Transparent Gradation, Multi layer, Path Animation, Time curve

  1. Take your SVG image and convert it to a VectorDrawable here
  2. Add your downloaded XML file to your project and see how it looks. Heres an example of an VectorDrawable prepared for a rotation and path morph animation:

    <vector xmlns:android=""
     android:viewportWidth="600" >
         android:rotation="45.0" >
             android:pathData="M300,70 l 0,-70 70,70 0,0 -70,70z" />

3 Now create a AnimatedVectorDrawable where you refer to the rotationGroup and path morph in the created VectorDrawable

<?xml version="1.0" encoding="UTF-8"?>
<animated-vector xmlns:android="" android:drawable="@drawable/vectordrawable">
   <target android:name="rotationGroup" android:animation="@anim/rotation" />
   <target android:name="v" android:animation="@anim/path_morph" />

4 Create two animators for the AnimatedVectorDrawable:

    android:valueTo="360" />

and :

<set xmlns:android="">
        android:valueFrom="M300,70 l 0,-70 70,70 0,0 -70,70z"
        android:valueTo="M300,70 l 0,-70 70,0  0,140 -70,0 z"

(It is also possible to define all this in one file, refer to the docs here)

One way to then start the animation is by getting the drawable from the view and run start().

Animate drawable graphics, Then, Android API 22 introduced AnimatedVectorDrawable and Support Here you have the process to go from any SVG to a nice morphing Then, we just need to keep track of which animation we played last, so we can  Android Apps by SVG Animation on Google Play Enjoy millions of the latest Android apps, games, music, movies, TV, books, magazines & more. Anytime, anywhere, across your devices. Enjoy millions of

Use VectorDrawable. if target is under Lollipop use support library.

Animate that icon! Easily create Animated Vector Drawables, AnimatedSvgView. Maven Central License API Twitter Follow. Animated SVG Drawing for Android. DEMO. Usage. View all of Issues. I have a post about the easiest way to implement icon animations on Android – with Animated Vector Drawables (SVG) I’m using a tool by Alex Lockwood – Shape Shifter, it has a great interface for creating Animated Vector Drawables or just editing your vectors.

jaredrummler/AnimatedSvgView: Animated SVG Drawing for Android, Shape Shifter is a web-app that simplifies the creation of icon animations for Android, iOS, and the web. View all of  Tutorial about how to integrate SVG file in Android Studio. Develop by Richathon. - SVG in Android -

alexjlockwood/ShapeShifter: SVG icon animation tool for Android , For this post, I decided to download this icon from in SVG Then, you just have to run the animation by clicking on the “Play” icon… Great ! 🎉 Our first animation image (animation_start.svg) is correctly shown. Now, let’s add the other images (animation_1.svg, animation_2.svg & animation_3.svg) to create the full animation. Add a new “group layer” :

Android Animated Vector Drawable Animations, Animated SVG files have become very popular. stay more towards the bottom of the screen, but after importing it to SVGator and playing with  If you want to play the animation immediately, without requiring interaction, then you might want to call it from the onStart() method in your Activity, which will get called when Android makes the view visible on screen. For more information on the XML syntax, available tags and attributes, see Animation Resources. Use AnimatedVectorDrawable