Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3137,6 +3137,7 @@ package android.animation { public final class AnimatorSet extends android.animation.Animator { ctor public AnimatorSet(); method public java.util.ArrayList<android.animation.Animator> getChildAnimations(); method public long getCurrentPlayTime(); method public long getDuration(); method public long getStartDelay(); method public boolean isRunning(); api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3257,6 +3257,7 @@ package android.animation { public final class AnimatorSet extends android.animation.Animator { ctor public AnimatorSet(); method public java.util.ArrayList<android.animation.Animator> getChildAnimations(); method public long getCurrentPlayTime(); method public long getDuration(); method public long getStartDelay(); method public boolean isRunning(); api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3137,6 +3137,7 @@ package android.animation { public final class AnimatorSet extends android.animation.Animator { ctor public AnimatorSet(); method public java.util.ArrayList<android.animation.Animator> getChildAnimations(); method public long getCurrentPlayTime(); method public long getDuration(); method public long getStartDelay(); method public boolean isRunning(); core/java/android/animation/AnimatorSet.java +25 −0 Original line number Diff line number Diff line Loading @@ -934,6 +934,31 @@ public final class AnimatorSet extends Animator implements AnimationHandler.Anim } } /** * Gets the current position of the animation in time, which is equal to the current * time minus the time that the animation started. An animation that is not yet started will * return a value of zero, unless the animation has has its play time set via * {@link #setCurrentPlayTime(long)}, in which case it will return the time that was set. * * @return The current position in time of the animation. */ public long getCurrentPlayTime() { if (mSeekState.isActive()) { return mSeekState.getPlayTime(); } if (mLastFrameTime == -1) { // Not yet started or during start delay return 0; } float durationScale = ValueAnimator.getDurationScale(); durationScale = durationScale == 0 ? 1 : durationScale; if (mReversing) { return (long) ((mLastFrameTime - mFirstFrame) / durationScale); } else { return (long) ((mLastFrameTime - mFirstFrame - mStartDelay) / durationScale); } } private void initChildren() { if (!isInitialized()) { mChildrenInitialized = true; Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3137,6 +3137,7 @@ package android.animation { public final class AnimatorSet extends android.animation.Animator { ctor public AnimatorSet(); method public java.util.ArrayList<android.animation.Animator> getChildAnimations(); method public long getCurrentPlayTime(); method public long getDuration(); method public long getStartDelay(); method public boolean isRunning();
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3257,6 +3257,7 @@ package android.animation { public final class AnimatorSet extends android.animation.Animator { ctor public AnimatorSet(); method public java.util.ArrayList<android.animation.Animator> getChildAnimations(); method public long getCurrentPlayTime(); method public long getDuration(); method public long getStartDelay(); method public boolean isRunning();
api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3137,6 +3137,7 @@ package android.animation { public final class AnimatorSet extends android.animation.Animator { ctor public AnimatorSet(); method public java.util.ArrayList<android.animation.Animator> getChildAnimations(); method public long getCurrentPlayTime(); method public long getDuration(); method public long getStartDelay(); method public boolean isRunning();
core/java/android/animation/AnimatorSet.java +25 −0 Original line number Diff line number Diff line Loading @@ -934,6 +934,31 @@ public final class AnimatorSet extends Animator implements AnimationHandler.Anim } } /** * Gets the current position of the animation in time, which is equal to the current * time minus the time that the animation started. An animation that is not yet started will * return a value of zero, unless the animation has has its play time set via * {@link #setCurrentPlayTime(long)}, in which case it will return the time that was set. * * @return The current position in time of the animation. */ public long getCurrentPlayTime() { if (mSeekState.isActive()) { return mSeekState.getPlayTime(); } if (mLastFrameTime == -1) { // Not yet started or during start delay return 0; } float durationScale = ValueAnimator.getDurationScale(); durationScale = durationScale == 0 ? 1 : durationScale; if (mReversing) { return (long) ((mLastFrameTime - mFirstFrame) / durationScale); } else { return (long) ((mLastFrameTime - mFirstFrame - mStartDelay) / durationScale); } } private void initChildren() { if (!isInitialized()) { mChildrenInitialized = true; Loading