Register now for Android Dev Summit 2019!

NewInstanceFactory

open class NewInstanceFactory : ViewModelProvider.Factory
kotlin.Any
   ↳ androidx.lifecycle.ViewModelProvider.NewInstanceFactory

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

Summary

Public constructors

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

Public methods

open T
create(@NonNull modelClass: Class<T>)

Public constructors

<init>

NewInstanceFactory()

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

Public methods

create

@NonNull open fun <T : ViewModel!> create(@NonNull modelClass: Class<T>): T