Implementation of a RecyclerSubContainerController for visualizing panels in a list.

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

Use the invoke operator for constructing this class with a panel type P with a CommonPanelContext.



Provides the panel context factory for creating a panel context of type C. Use the receiver to create a PanelContextFactory. A panel context is created when a panel is attached to a panel sub-container. The panel is provided as argument to the factory.


The type of the panel container data that is visualized by the panel container.


The panel sub-container view model type.


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


The panel context type.


Link copied to clipboard
constructor(@LayoutRes subContainerLayoutId: Int? = null, providePanelContextFactory: PanelContextFactoryProvider.(P) -> PanelContextFactory<C>)


Link copied to clipboard
object Companion


Link copied to clipboard
open override fun areSubContainerDataTheSame(oldSubContainerData: P, newSubContainerData: P): Boolean

Returns true when oldSubContainerData is the same as newSubContainerData.

Link copied to clipboard
open override fun createSubContainer(panelContainer: ViewGroup, subContainerViewModel: VM): SubContainerCreation<VM, P>

Creates a panel sub-container. The panel sub-container must have at least one panel fragment container.

Link copied to clipboard
open override fun getSubContainerData(panelContainerData: CD?): List<P>

Returns the data that should be provided to each panel sub-container derived from panelContainerData.