PanelListSubContainerController

Implementation of a RecyclerSubContainerController for a panel list.

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

Parameters

CD

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

VM

The panel sub-container view model type.

P

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

Constructors

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

Functions

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): RecyclerSubContainerController.SubContainerCreationResult<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.