ViewModelProvider.NewInstanceFactory.Companion

object ViewModelProvider.NewInstanceFactory.Companion


Summary

Public fields

final @NonNull CreationExtras.Key<@NonNull String>

A CreationExtras.Key to get a key associated with a requested ViewModel from CreationExtras

Public fields

VIEW_MODEL_KEY

public final @NonNull CreationExtras.Key<@NonNull StringVIEW_MODEL_KEY

A CreationExtras.Key to get a key associated with a requested ViewModel from CreationExtras

ViewModelProvider automatically puts a key that was passed to ViewModelProvider.get(key, MyViewModel::class.java) or generated in ViewModelProvider.get(MyViewModel::class.java) to the CreationExtras that are passed to ViewModelProvider.Factory.