is Animator Paused - Android android.animation

Android examples for android.animation:Animator

Description

is Animator Paused

Demo Code


//package com.java2s;
import android.animation.Animator;
import android.os.Build;
import java.util.List;

public class Main {

    public static boolean isPaused(List<Animator> animators) {
        if (animators != null && animators.size() > 0) {
            boolean isAllPaused = true;
            for (Animator animator : animators) {
                if (isPaused(animator) == false) {
                    isAllPaused = false;
                }//w  ww .j  av  a  2  s. c o  m
            }
            return isAllPaused;
        }
        return false;
    }

    public static boolean isPaused(Animator animator) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            return animator != null && animator.isPaused();
        }
        return false;
    }
}

Related Tutorials