Java tutorial
//package com.java2s; //License from project: Apache License import android.animation.Animator; import java.util.List; public class Main { /** * cancel * * @param animators * @return */ public static boolean cancel(List<Animator> animators) { boolean isCancelCalled = false; if (animators != null) { for (Animator animator : animators) { if (cancel(animator)) { isCancelCalled = true; } } } return isCancelCalled; } /** * cancel * * @param animator * @return */ public static boolean cancel(Animator animator) { if (animator != null) { animator.cancel(); return true; } return false; } }