Can anyone please tell me how to pause and restart an animations in Android.
Animation XML is:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:fromXDelta="500%" android:toXDelta="0%"
android:fromYDelta="0%" android:toYDelta="0%"
android:duration="10000"
android:fillAfter="true"
android:repeatCount="infinite"/>
</set>
And the code is:
Animation am=AnimationUtils.loadAnimation(this, R.anim.note);
music1.startAnimation(am);