Example usage for android.animation AnimatorSet isStarted

List of usage examples for android.animation AnimatorSet isStarted

Introduction

In this page you can find the example usage for android.animation AnimatorSet isStarted.

Prototype

@Override
    public boolean isStarted() 

Source Link

Usage

From source file:Main.java

public static void seekAnim(AnimatorSet animatorset, long l1) {
    if (animatorset != null) {
        if (animatorset.isStarted()) {
            animatorset.end();// w  ww .  j ava  2s  . c o  m
        }
        Iterator iterator = animatorset.getChildAnimations().iterator();
        do {
            if (!iterator.hasNext()) {
                break;
            }
            Animator animator = (Animator) iterator.next();
            long l2 = l1 - animator.getStartDelay();
            if (l2 < 0L) {
                l2 = 0L;
            }
            if (animator instanceof ValueAnimator) {
                ((ValueAnimator) animator).setCurrentPlayTime(l2);
            }
        } while (true);
    }
}