Android examples for User Interface:ImageView
stop Animation on ImageView
//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(); }/*from ww w . j a v a 2 s. co m*/ if (pAnimation != null && pAnimation.isRunning()) { pAnimation.stop(); } } }