ManualAnimationClock

class ManualAnimationClock : BaseAnimationClock
kotlin.Any
   ↳ androidx.animation.BaseAnimationClock
   ↳ androidx.animation.ManualAnimationClock

A custom clock whose frame time can be manually updated via mutating clockTimeMillis.

Summary

Public constructors

<init>(initTimeMillis: Long)

A custom clock whose frame time can be manually updated via mutating clockTimeMillis.

Public methods

Unit

Subscribes an observer to the animation clock source.

Inherited functions

Properties

Long

Clock time in milliseconds.

Public constructors

<init>

ManualAnimationClock(initTimeMillis: Long)

A custom clock whose frame time can be manually updated via mutating clockTimeMillis.

Public methods

subscribe

fun subscribe(observer: AnimationClockObserver): Unit

Subscribes an observer to the animation clock source.

Parameters
observer: AnimationClockObserver The observer that will be notified when animation clock time is updated.

Properties

clockTimeMillis

var clockTimeMillis: Long

Clock time in milliseconds. When clockTimeMillis is updated, the ManualAnimationClock notifies all its observers (i.e. animations) the new clock time. The animations will consequently snap to the new play time.