Android: how to display animation with transparent BG?

I would like to display an animation with a transparent background on transparent activity. How can I implement this with Android? I was thinking about flash, but the user needs to install flash, right? I would prefer vector graphics instead of gifs.

Many thanks!

Example:

enter image description here

+3
source share
2 answers

The best way to show animations is to save them as PNG and do something like this for animation, put this in your drawable folder:

<animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="false"> 
    <item android:drawable="@drawable/ant1" android:duration="100" /> 
    <item android:drawable="@drawable/ant2" android:duration="100" /> 
    <item android:drawable="@drawable/ant3" android:duration="100" /> 
    <item android:drawable="@drawable/ant2" android:duration="100" /> 
</animation-list>

If you want to use vector graphics, you will have to manually switch images. You can watch svg-android , which is a great way to use simple vector images in Android.

+1

Theme.Transparent ... . ... KenBurnsView

+1

All Articles