ViewModelProvider.NewInstanceFactory.Companion

object ViewModelProvider.NewInstanceFactory.Companion


Summary

Public properties

CreationExtras.Key<String>

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

Public properties

VIEW_MODEL_KEY

val VIEW_MODEL_KEYCreationExtras.Key<String>

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.