I want an animated gif, since this isn’t possible in Android I am using individual frames in a transition.
except it seems like the transition class only will show two frames ever! I saw other animation methods but they didn’t seem to apply to what I was doing, or seemed old and convulated like for an older infant android build
<transition xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/activateanima"></item>
<item android:drawable="@drawable/activateanimb"></item>
<item android:drawable="@drawable/activateanimc"></item>
<item android:drawable="@drawable/activateanimc"></item>
<item android:drawable="@drawable/activateanimd"></item>
<item android:drawable="@drawable/activateanime"></item>
<item android:drawable="@drawable/activateanimf"></item>
<item android:drawable="@drawable/activateanimg"></item>
</transition>
How do I animate an image to behave like an animated gif, in place. no rotations or translations here. Using android 2.1+
Are you after a
Frame animation? See: here. This will play a standing still animation.Example from above site:
XML file saved at res/anim/rocket.xml:
To use: