标签: android viewmodel androidx android-jetpack
androidx ViewModelProvider不允许“ this”作为有效参数,即使它是活动
private fun initializeUI(){ val factory = InjectorUtils.provideQuotesViewModelFactory() val viewModel = ViewModelProviders.of(this,factory).get(QuotesViewModel::class.java) }