ViewModelProvider.NewInstanceFactory


public class ViewModelProvider.NewInstanceFactory implements ViewModelProvider.Factory


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

Summary

Public constructors

Public methods

@NonNull T
<T extends ViewModel> create(
    @NonNull KClass<@NonNull T> modelClass,
    @NonNull CreationExtras extras
)

Public constructors

NewInstanceFactory

Added in 2.0.0
public NewInstanceFactory()

Public methods

create

public @NonNull T <T extends ViewModel> create(
    @NonNull KClass<@NonNull T> modelClass,
    @NonNull CreationExtras extras
)