ViewModelProviders.DefaultFactory


public class ViewModelProviders.DefaultFactory


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

Summary

Public constructors

This method is deprecated.

Use ViewModelProvider.AndroidViewModelFactory or getInstance.

Public constructors

DefaultFactory

Added in 2.0.0
Deprecated in 2.0.0
public DefaultFactory(@NonNull Application application)

Creates a AndroidViewModelFactory

Parameters
@NonNull Application application

an application to pass in AndroidViewModel