PanelSubContainerAnimationController

class PanelSubContainerAnimationController<SD>

An animation controller for sub-container controllers to animate creation and removal of a sub-container.

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

SD

The data type that is used by sub-containers to populate the sub-container views within a panel container view. It can be a single panel, a collection of panels or any other panel-related type. It is derived from the panel container data.

Functions

Link copied to clipboard
fun animateEnter(    subContainerData: SD,     subContainer: View,     onAnimationEnd: () -> Unit = {})

Executes an enter animation for creation of subContainer, and invokes onAnimationEnd block when the animation completes. If no animation is available, onAnimationEnd is invoked immediately.

Link copied to clipboard
fun animateExit(    subContainerData: SD,     subContainer: View,     onAnimationEnd: () -> Unit = {})

Executes an exit animation for removal of subContainer, and invokes onAnimationEnd block when the animation completes. If no animation is available, onAnimationEnd is invoked immediately.