Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.animation.Animator;

import java.util.List;

public class Main {
    /**
     * end a list of animator
     *
     * @param animators
     * @return
     */
    public static boolean end(List<Animator> animators) {
        boolean isEndCalled = false;
        if (animators != null) {
            for (Animator animator : animators) {
                if (end(animator)) {
                    isEndCalled = true;
                }
            }
        }
        return isEndCalled;
    }

    /**
     * call function and end
     *
     * @param animator
     * @return
     */
    public static boolean end(Animator animator) {
        if (animator != null && animator.isStarted()) {
            animator.end();
            return true;
        }
        return false;
    }
}