Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
Seems to be a DNS problem with systems that have 'obtain DNS server address automatically'. Changed my system to a manual setting and the browser etc now work. SDK 2.2 didn't seem to mind the auto setting though.
Description
In addition to being able to do
val viewModel: MyViewModel by viewModels()
It would be nice to also be able to gain access to Activity scoped ViewModels via something like
val viewModel: MyViewModel by activityViewModels()
Or perhaps a more general solution could be made by having by viewModels() take in a () -> ViewModelStoreOwner lambda which would be used as the ViewModelStoreOwner when constructing the ViewModelProvider:
val viewModel: MyViewModel by viewModels(viewModelFactory) { requireActivity() }
where the default value for the lambda could just be { this } to use the Fragment