DefaultPanelSubContainerAnimator

class DefaultPanelSubContainerAnimator<VM : PanelSubContainerViewModel<SD>, SD>(    lifecycleOwner: LifecycleOwner,     enterAnimationProvider: PanelSubContainerAnimationProvider<SD>?,     exitAnimationProvider: PanelSubContainerAnimationProvider<SD>?) : PanelContainerElementAnimator<VM, SD>

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

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

Use createPanelSubContainerAnimationController 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.

enterAnimationProvider

A provider of the animation used for the creation of sub-containers.

exitAnimationProvider

A provider of the animation used for the removal 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
fun <SD> DefaultPanelSubContainerAnimator(    lifecycleOwner: LifecycleOwner,     enterAnimationProvider: PanelSubContainerAnimationProvider<SD>?,     exitAnimationProvider: PanelSubContainerAnimationProvider<SD>?)

Functions

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.