ModalViewModel
abstract class ModalViewModel<P : ModalPanel>(panel: P) : FrontendViewModel<P> , NavigablePanelViewModel<P>
Content copied to clipboard
A view model which can be used to populate R.layout.ttivi_modal_fragment.
The modal panel consists of several components. Most components can be populated by their own view model. However, the content area section is not populated by a view model and has to be populated by the ModalFragment using the ModalFragment.contentViewFactory.
A schematic overview of the modal panel template:
________________________________________________________________
| navigationBarViewModel iconButtonsViewModel closeButton|
| ________ ___ ___ ___ |
| | title | | | | | | X | | Header section
| |_______| |___| |___| |___| |
|________________________________________________________________|
| |
| ************************************************************* |
| ************************************************************* |
| *********************** Content area *********************** | Content area section
| ************************************************************* |
| ************************************************************* |
|________________________________________________________________|
| ____________________ | ____________________ |
| | Secondary | | | Primary | | Action buttons section
| | action button | | | action button | | populated with
| |____________________| | |____________________| | actionButtonsViewModel
|_____________________________|__________________________________|
Content copied to clipboard
Constructors
Properties
Link copied to clipboard
open val actionButtonsViewModel: VisibilityProvidingCompositeViewModel<TtButtonViewModel>
Content copied to clipboard
Link copied to clipboard
open val iconButtonsViewModel: VisibilityProvidingCompositeViewModel<TtButtonViewModel>
Content copied to clipboard
Inherited properties
Functions
Link copied to clipboard
open override fun getNavigationBarViewModel(iviFragmentId: IviFragmentId): LiveData<NavigationBarViewModel?>
Content copied to clipboard
Link copied to clipboard
The close button click callback. By default dismisses only the current modal panel. If a different behavior is needed, this can be overridden.