Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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();
        }
    }
}