DefaultFactory

open class DefaultFactory : ViewModelProvider.AndroidViewModelFactory
kotlin.Any
   ↳ androidx.lifecycle.ViewModelProvider.NewInstanceFactory
   ↳ androidx.lifecycle.ViewModelProvider.AndroidViewModelFactory
   ↳ androidx.lifecycle.ViewModelProviders.DefaultFactory

Factory which may create AndroidViewModel and ViewModel, which have an empty constructor.

Summary

Public constructors
<init>(@NonNull application: Application)

Use ViewModelProvider.AndroidViewModelFactory or ViewModelProvider.AndroidViewModelFactory#getInstance(Application).

Inherited functions

Public constructors

<init>

DefaultFactory(@NonNull application: Application)

Deprecated: Use ViewModelProvider.AndroidViewModelFactory or ViewModelProvider.AndroidViewModelFactory#getInstance(Application).

Creates a AndroidViewModelFactory

Parameters
application Application: an application to pass in AndroidViewModel