DefaultPanelSubContainerAnimator

Default PanelContainerElementAnimator which allows the animation for PanelContainerElement.SubContainerElement elements.

For PanelContainerElement.BasicElement elements this animator does not provide any animations.

Use createDefaultPanelSubContainerAnimator to construct this class.

Parameters

lifecycleOwner

An owner of a lifecycle that animations will be bound to to ensure they stop if a lifecycle goes to the destroyed state.

subContainerAnimationProvider

A provider of the enter and exit animations used for the entrance and exit of sub-containers.

VM

The panel sub-container view model type.

SD

The type of the panel sub-container data. The data is derived from the panel container data.

Constructors

Link copied to clipboard
constructor(lifecycleOwner: LifecycleOwner, subContainerAnimationProvider: SubContainerAnimationProvider<SD>)

Functions

Link copied to clipboard
open override fun endOngoingAnimations()

Ends all ongoing animations. This will cancel the animation and invoke the AnimationListener.onAnimationEnd.

Link copied to clipboard
open override fun runEnterAnimationIfAny(panelContainerElementHolder: PanelContainerElementHolder<VM, SD>, animationListener: Animation.AnimationListener): Boolean

Called to run an animation, if any, when a PanelContainerElement referenced by panelContainerElementHolder enters a panel container.

Link copied to clipboard
open override fun runExitAnimationIfAny(panelContainerElementHolder: PanelContainerElementHolder<VM, SD>, animationListener: Animation.AnimationListener): Boolean

Called to run an animation, if any, when a PanelContainerElement referenced by panelContainerElementHolder exits a panel container.