Java tutorial
//package com.java2s; //License from project: Apache License import android.animation.Animator; import android.animation.AnimatorSet; import android.animation.ValueAnimator; import android.view.View; import java.util.Iterator; public class Main { 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); } } public static void seekAnim(View view, AnimatorSet animatorset, long l1) { seekAnim(animatorset, l1); view.postInvalidateOnAnimation(); } }