StockVisibilityProvidingCompositeViewModel
open class StockVisibilityProvidingCompositeViewModel<T : VisibilityProvider>(viewModels: List<T>, isVisible: Boolean) : VisibilityProvidingCompositeViewModel<T>
Content copied to clipboard
A view model that holds multiple visible instances. By default, this instance is visible, when any of the held view models is visible.
This type facilitates convenient access to common operations from Android layouts through data binding. These utilities are normally accessed through extension functions, which cannot be used cleanly in the data binding syntax.
Parameters
viewModels
The view models that are held.
isVisible
Determines whether the instance should be visible or not.
Constructors
Link copied to clipboard
fun <T : VisibilityProvider> StockVisibilityProvidingCompositeViewModel(vararg viewModels: T)
Content copied to clipboard
Link copied to clipboard
fun <T : VisibilityProvider> StockVisibilityProvidingCompositeViewModel(viewModels: List<T>, isVisible: Boolean = viewModels.any { it.isVisible })
Content copied to clipboard