CompositeViewModelFactory

Composes multiple ViewModelProvider.Factorys. When create is called to create a view model it will try each factory in factories until it finds a factory which can create the requested view model.

Throws

when none of the factories is able to create the view model.

Constructors

Link copied to clipboard
constructor(factory: ViewModelProvider.Factory)
constructor(factories: List<ViewModelProvider.Factory>)

Functions

Link copied to clipboard
open override fun <T : ViewModel> create(modelClass: Class<T>): T

Inherited functions

Link copied to clipboard
open fun <T : ViewModel> create(modelClass: Class<T>, extras: CreationExtras): T
open fun <T : ViewModel> create(modelClass: KClass<T>, extras: CreationExtras): T