ViewModelProviders.DefaultFactory

public static class ViewModelProviders.DefaultFactory
extends ViewModelProvider.AndroidViewModelFactory

java.lang.Object
   ↳ androidx.lifecycle.ViewModelProvider.NewInstanceFactory
     ↳ androidx.lifecycle.ViewModelProvider.AndroidViewModelFactory
       ↳ androidx.lifecycle.ViewModelProviders.DefaultFactory


This class is deprecated.
Use ERROR(/ViewModelProvider.AndroidViewModelFactory)

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

Summary

Inherited constants

Inherited fields

Public constructors

DefaultFactory(Application application)

This constructor is deprecated. Use ERROR(/ViewModelProvider.AndroidViewModelFactory) or ERROR(/ViewModelProvider.AndroidViewModelFactory#getInstance(Application)).

Inherited methods

Public constructors

DefaultFactory

public DefaultFactory (Application application)

This constructor is deprecated.
Use ERROR(/ViewModelProvider.AndroidViewModelFactory) or ERROR(/ViewModelProvider.AndroidViewModelFactory#getInstance(Application)).

Creates a AndroidViewModelFactory

Parameters
application Application: an application to pass in AndroidViewModel