Java Code Examples for android.animation.AnimatorSet#end()

The following examples show how to use android.animation.AnimatorSet#end() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SlideshowImageView.java    From SlideshowToolbar with Apache License 2.0 5 votes vote down vote up
@Override
protected void onDetachedFromWindow() {
    super.onDetachedFromWindow();

    loopHandler.removeMessages(1);

    for(AnimatorSet animatorSet : animatorSets){
        animatorSet.end();
    }

    animatorSets.clear();
    animatorSets = null;
}
 
Example 2
Source File: AnimUtil.java    From MiBandDecompiled with Apache License 2.0 5 votes vote down vote up
public static void seekAnim(AnimatorSet animatorset, long l1)
{
    if (animatorset != null)
    {
        if (animatorset.isStarted())
        {
            animatorset.end();
        }
        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);
    }
}