Bruno_
03/14/2020, 12:33 PMby viewModels()
? tried to google creating view model manually
and kotlin by viewModels()
, couldn't find anything interestingWe cannot directly create the object of the ViewModel as it would not be aware of the lifecyclerOwner.
Kulwinder Singh
03/14/2020, 12:57 PMval myViewModel = ViewModelProvider(this).get(MyViewModel::class.java)
Bruno_
03/14/2020, 12:59 PMwhy
not how
but thanks anyway