Java tutorial
//package com.java2s; import android.animation.Animator; public class Main { public static void stopAnimator(Animator animator) { if (animator != null && animator.isRunning()) { animator.cancel(); } } public static boolean isRunning(Animator animator) { return animator != null && animator.isRunning(); } }