StockVisibilityProvidingCompositeViewModel

open class StockVisibilityProvidingCompositeViewModel<T : VisibilityProvider>(val viewModels: List<T>, val isVisible: Boolean = viewModels.any { it.isVisible }) : VisibilityProvidingCompositeViewModel<T>

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

constructor(vararg viewModels: T)
constructor(viewModels: List<T>, isVisible: Boolean = viewModels.any { it.isVisible })

Properties

Link copied to clipboard
open override val isVisible: Boolean
Link copied to clipboard
override val viewModels: List<T>