Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

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