1 min readSep 4, 2019
Nice solution . Thanks for sharing the implementation details!
For more concise code this may be implemented with Kotlin as in ’s sample, Android ViewModel with Custom Arguments. With this strategy the CryptoTrackerViewModelFactory
class constructor is not required when overriding ViewModelProvider.NewInstanceFactory
.