Java tutorial
//package com.java2s; import android.graphics.drawable.AnimationDrawable; import android.widget.ImageView; public class Main { public static AnimationDrawable startAnimDrawable(ImageView img) { AnimationDrawable animDrawble = (AnimationDrawable) img.getBackground(); animDrawble.setOneShot(false); animDrawble.start(); return animDrawble; } }