Share via


AnimatorSet.CurrentPlayTime Property

Definition

Returns the milliseconds elapsed since the start of the animation. -or- Sets the position of the animation to the specified point in time.

public long CurrentPlayTime { [Android.Runtime.Register("getCurrentPlayTime", "()J", "", ApiSince=26)] get; [Android.Runtime.Register("setCurrentPlayTime", "(J)V", "", ApiSince=26)] set; }
[<get: Android.Runtime.Register("getCurrentPlayTime", "()J", "", ApiSince=26)>]
[<set: Android.Runtime.Register("setCurrentPlayTime", "(J)V", "", ApiSince=26)>]
member this.CurrentPlayTime : int64 with get, set

Property Value

the current position in time of the animation in milliseconds

Attributes

Remarks

Property getter documentation:

Returns the milliseconds elapsed since the start of the animation.

For ongoing animations, this method returns the current progress of the animation in terms of play time. For an animation that has not yet been started: if the animation has been seeked to a certain time via #setCurrentPlayTime(long), the seeked play time will be returned; otherwise, this method will return 0.

Java documentation for android.animation.AnimatorSet.getCurrentPlayTime().

Property setter documentation:

Sets the position of the animation to the specified point in time. This time should be between 0 and the total duration of the animation, including any repetition. If the animation has not yet been started, then it will not advance forward after it is set to this time; it will simply set the time to this value and perform any appropriate actions based on that time. If the animation is already running, then setCurrentPlayTime() will set the current playing time to this value and continue playing from that point. On Build.VERSION_CODES#UPSIDE_DOWN_CAKE and above, an AnimatorSet that hasn't been #start()ed, will issue android.animation.Animator.AnimatorListener#onAnimationStart(Animator, boolean) and android.animation.Animator.AnimatorListener#onAnimationEnd(Animator, boolean) events.

Java documentation for android.animation.AnimatorSet.setCurrentPlayTime(long).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to