Google berkomitmen untuk mendorong terwujudnya keadilan rasial bagi komunitas Kulit Hitam. Lihat caranya.

ViewModelProvider.NewInstanceFactory

public static class ViewModelProvider.NewInstanceFactory
extends Object implements ViewModelProvider.Factory

java.lang.Object
   ↳ androidx.lifecycle.ViewModelProvider.NewInstanceFactory


Simple factory, which calls empty constructor on the give class.

Summary

Public constructors

NewInstanceFactory()

Public methods

<T extends ViewModel> T create(Class<T> modelClass)

Creates a new instance of the given Class.

Inherited methods

Public constructors

NewInstanceFactory

public NewInstanceFactory ()

Public methods

create

public T create (Class<T> modelClass)

Creates a new instance of the given Class.

Parameters
modelClass Class: a Class whose instance is requested

Returns
T a newly created ViewModel