Google se compromete a impulsar la igualdad racial para las comunidades afrodescendientes. Obtén información al respecto.

ViewModelProvider.Factory

public static interface ViewModelProvider.Factory

androidx.lifecycle.ViewModelProvider.Factory


Implementations of Factory interface are responsible to instantiate ViewModels.

Summary

Public methods

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

Creates a new instance of the given Class.

Public methods

create

public abstract 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