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 ViewModelProvider.AndroidViewModelFactory

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

Summary

Public constructors

ViewModelProviders.DefaultFactory(Application application)

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

Inherited methods

Public constructors

ViewModelProviders.DefaultFactory

public ViewModelProviders.DefaultFactory (Application application)

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

Creates a AndroidViewModelFactory

Parameters
application Application: an application to pass in AndroidViewModel