Nice solution Bryan Okeke. Thanks for sharing the implementation details!

For more concise code this may be implemented with Kotlin as in Mohit Sharma’s sample, Android ViewModel with Custom Arguments. With this strategy the CryptoTrackerViewModelFactory class constructor is not required when overriding ViewModelProvider.NewInstanceFactory.

DeFi Punk

Love podcasts or audiobooks? Learn on the go with our new app.