Tuesday, 20 August 2013

How to form an animation xml

How to form an animation xml

I want to make an animation-list with multiple items and each item
contains a rotate tag . What is the proper way to form it ? Is there an
other way to do the same ? Here is my code :
<?xml version="1.0" encoding="utf-8"?>
<animation-list
<item xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="true"
<rotate
android:interpolator="@android:anim/linear_interpolator"
android:repeatMode="restart"
android:fromDegrees="0"
android:toDegrees="50"
android:pivotX="301"
android:pivotY="334"
android:duration="1000"
android:startOffset="0"
/>
</item>
<item xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="true"
<rotate
android:interpolator="@android:anim/linear_interpolator"
android:repeatMode="restart"
android:fromDegrees="50"
android:toDegrees="20"
android:pivotX="301"
android:pivotY="334"
android:duration="859"
android:startOffset="0"
/>
</item>
</animation-list>
I want this xml to repeat when its over . Please help.

No comments:

Post a Comment