StateDrivenPanelContainerControllerAdapter

@IviExperimental(reasons = [])
class StateDrivenPanelContainerControllerAdapter<V : ViewGroup, CD, VM : PanelSubContainerViewModel<SD>, SD>(subContainerController: StateDrivenSubContainerController<CD, VM, SD>, subContainerViewModelFactory: () -> VM, panelContainerElementAnimator: PanelContainerElementAnimator<VM, SD>) : BasePanelContainerControllerAdapter<V, CD, VM, SD>

State driven PanelContainerControllerAdapter.

This PanelContainerControllerAdapter implementation fulfills the responsibilities of a PanelContainerControllerAdapter based on state changes. The state consists of the panel controller data of type CD and the panel sub-container view models.

The behavior of this adapter is controlled by the data provided back by the subContainerController and the panelContainerElementAnimator. Panel sub-container view model classes are created with the subContainerViewModelFactory.

Parameters

V

The container ViewGroup type that implements the PanelContainer interface.

CD

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

VM

The panel sub-container view model type.

SD

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

Constructors

fun <CD, VM : PanelSubContainerViewModel<SD>, SD> StateDrivenPanelContainerControllerAdapter(subContainerController: StateDrivenSubContainerController<CD, VM, SD>, subContainerViewModelFactory: () -> VM, panelContainerElementAnimator: PanelContainerElementAnimator<VM, SD>)

Properties

Link copied to clipboard
open override val subContainerViewModels: List<VM>

The panel sub-container view models.

Functions

Link copied to clipboard
open override fun onStop(): PanelContainerViewModel<CD, VM, SD>

Called when the system UI is stopped.

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

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

Inherited functions

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

Initializes adapterContext and invokes restore if restorePanelContainerViewModel is non-null.