Adapts PanelContainerElements to a PanelContainer.

Responsible for:

  • Creation of PanelContainerElements.

  • Adding and removing of panel container elements in the view hierarchy.

  • Execution of panel container element animations.

  • Associating the panel sub-container data of type SD to the view models of each panel sub-container.

  • Creating PanelFragmentAdapters per panel sub-container. PanelFragmentAdapters define the logic for attaching Panels to panel fragment containers. A panel sub-container contains one or more panel fragment containers.

  • Keeping track of the active panel sub-container view models and restore the state of the panel sub-containers based on this when the view is restored.



The panel container ViewGroup type that implements the PanelContainer interface.


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


The panel sub-container view model type.


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



Link copied to clipboard

The panel sub-container view models.


Link copied to clipboard
abstract fun initialize(adapterContext: PanelContainerControllerAdapterContext<V>, restorePanelContainerViewModel: PanelContainerViewModel<CD, VM, SD>?)

Initializes the adapter. This must be called before update or onStop is called.

Link copied to clipboard
abstract fun onDestroy()

Called when the system UI is destroyed.

Link copied to clipboard

Called when the system UI is stopped.

Link copied to clipboard
abstract fun update(panelContainerData: CD?)

Called whenever the panel container data for the PanelContainer has been changed.