ViewModelProviders.DefaultFactory



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

Summary

Public constructors

This function is deprecated.

Use ViewModelProvider.AndroidViewModelFactory or getInstance.

android

Public constructors

DefaultFactory

DefaultFactory(application: Application)

Creates a AndroidViewModelFactory

Parameters
application: Application

an application to pass in AndroidViewModel