public class

ViewModelProviders.DefaultFactory

extends ViewModelProvider.AndroidViewModelFactory

 java.lang.Object

androidx.lifecycle.ViewModelProvider.NewInstanceFactory

androidx.lifecycle.ViewModelProvider.AndroidViewModelFactory

↳androidx.lifecycle.ViewModelProviders.DefaultFactory

Overview

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

Summary

Constructors
publicDefaultFactory(Application application)

Creates a AndroidViewModelFactory

Methods
from ViewModelProvider.AndroidViewModelFactorycreate, getInstance
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public DefaultFactory(Application application)

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

Creates a AndroidViewModelFactory

Parameters:

application: an application to pass in AndroidViewModel