Java tutorial
//package com.java2s; import android.graphics.drawable.AnimationDrawable; import android.widget.ImageView; public class Main { public static void stopAnimation(ImageView pImageView) { AnimationDrawable pAnimation = null; if (pImageView != null) { pAnimation = (AnimationDrawable) pImageView.getBackground(); } if (pAnimation != null && pAnimation.isRunning()) { pAnimation.stop(); } } }