SinglePanelSubContainerController

A panel sub-container controller for visualizing a single panel in a panel container.

For each panel sub-container a layout based on subContainerLayoutId is inflated. If subContainerLayoutId is null then a default FragmentContainerView is used.

Parameters

VM

The panel sub-container view model type.

P

The panel type.

Constructors

Link copied to clipboard
fun SinglePanelSubContainerController(@LayoutRes subContainerLayoutId: Int? = null)

Functions

Link copied to clipboard
open override fun createSubContainer(panelContainer: ViewGroup, subContainerViewModel: VM, panelContainerViewModel: PanelContainerViewModel<P?, VM, P>): StateDrivenSubContainerController.SubContainerCreationResult<VM, P>

Creates a new panel sub-container. If getNewSubContainerData returned a non-empty collection, this method is called for each item in the collection.

Link copied to clipboard
open override fun getNewSubContainerData(panelContainerViewModel: PanelContainerViewModel<P?, VM, P>): Collection<P>

Determines if new panel sub-containers should be created, based on panelContainerViewModel.

Link copied to clipboard

Updates the panel sub-container data associated to the existing panel sub-container view models.

Link copied to clipboard
open override fun isSubContainerExitAllowed(subContainerViewModel: VM): Boolean

Whether the panel sub-container exit of the given subContainerViewModel is allowed.