Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
Thanks for filing the issue.
This is a particularly hard device to come by - do you happen to have access to the device? If so could you provide us with the output of: adb shell dumpsys media.camera > info.txt
Thanks!
This is a particularly hard device to come by - do you happen to have access to the device? If so could you provide us with the output of: adb shell dumpsys media.camera > info.txt
Thanks!
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