Google is committed to advancing racial equity for Black communities. See how.

BaseAnimationClock

abstract class BaseAnimationClock : AnimationClockObservable
kotlin.Any
   ↳ androidx.compose.animation.core.BaseAnimationClock

Base implementation for the AnimationClockObservable that handles the subscribing and unsubscribing logic that would be common for all custom animation clocks.

Summary

Public constructors

Base implementation for the AnimationClockObservable that handles the subscribing and unsubscribing logic that would be common for all custom animation clocks.

Public methods
open Unit

Subscribes observer to this clock.

open Unit

Unsubscribes an observer from the animation clock.

Inherited extension functions
From androidx.compose.animation
DisposableAnimationClock

Return a new AnimationClockObservable wrapping this one that will auto-unsubscribe all AnimationClockObservers when this call leaves the composition, preventing clock subscriptions from persisting beyond the composition lifecycle.

Public constructors

<init>

BaseAnimationClock()

Base implementation for the AnimationClockObservable that handles the subscribing and unsubscribing logic that would be common for all custom animation clocks.

Public methods

subscribe

open fun subscribe(observer: AnimationClockObserver): Unit

Subscribes observer to this clock. Duplicate subscriptions will be ignored.

unsubscribe

open 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.