The second Android 11 Developer Preview is now available, test it out and share your feedback.

BaseAnimationClock

sealed class BaseAnimationClock : AnimationClockObservable
kotlin.Any
   ↳ androidx.animation.BaseAnimationClock

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

Summary

Public methods

open Unit

Subscribes observer to this clock.

open Unit

Unsubscribes an observer from the animation clock.

Inherited extension functions

From androidx.ui.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 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.