AnimationClockObservable
interface AnimationClockObservable
androidx.compose.animation.core.AnimationClockObservable |
This interface allows AnimationClock to be subscribed and unsubscribed.
Summary
Public methods | |
---|---|
abstract Unit |
subscribe(observer: AnimationClockObserver) Subscribes an observer to the animation clock source. |
abstract Unit |
unsubscribe(observer: AnimationClockObserver) Unsubscribes an observer from the animation clock. |
Extension functions | ||
---|---|---|
From androidx.compose.animation
|
Public methods
subscribe
abstract fun subscribe(observer: AnimationClockObserver): Unit
Subscribes an observer to the animation clock source.
Observers may only be added to a clock once. Calls to add the same observer more than once will be ignored, and a single call to unsubscribe will unregister from further callbacks.
Parameters | |
---|---|
observer: AnimationClockObserver | The observer that will be notified when animation clock time is updated. |
unsubscribe
abstract fun unsubscribe(observer: AnimationClockObserver): Unit
Unsubscribes an observer from the animation clock.
Observers may only be added to a clock once. If subscribe has been called multiple times with the same observer, a single call to this method will unregister the observer completely.
Parameters | |
---|---|
observer: AnimationClockObserver | The observer to be removed from the subscription list. |