Created
January 1, 2022 20:36
-
-
Save ericntd/9a26bc0eee48a9d399b5e6adabf2fb1e to your computer and use it in GitHub Desktop.
Generic ViewModel Factory usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Inject | |
lateinit var viewModelFactory: GenericViewModelFactory<WeatherViewModel> | |
private val viewModel: WeatherViewModel by lazy { | |
ViewModelProvider(this, viewModelFactory).get(WeatherViewModel::class.java) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment