createSubContainer

abstract fun createSubContainer(panelContainer: ViewGroup, subContainerViewModel: VM, panelContainerViewModel: PanelContainerViewModel<CD, VM, SD>): SubContainerCreation<VM, SD>

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

Implementations should inflate a panel sub-container with inflateSubContainerAndBindViewModel to construct a MutableSubContainerCreation and use MutableSubContainerCreation.bindFragmentContainer or MutableSubContainerCreation.bindOptionalFragmentContainer to bind one or more PanelAttachmentProviders to FragmentContainerViews.

Note: Use PanelSubContainerViewModel.mutableExtraState delegate for mutable PanelSubContainerViewModel properties if a property change should be considered a panelContainerViewModel update and getNewSubContainerData, getSubContainerDataUpdates and isSubContainerExitAllowed should be called again.

Parameters

panelContainer

The panel container.

subContainerViewModel

The panel sub-container view model.

panelContainerViewModel

The current view model state of the adapter.