Get the same instance of ViewModel in Fragment which is defined in Activity with parameter
问题 So, I am using Koin for dependency injection, Here is what I did inside a activity class ModuleDetailActivity : AppCompatActivity() { private lateinit var moduleId:String private lateinit var levelModule:Level.Module private val moduleViewModel: ModuleViewModel by viewModel { parameterOf(moduleId, levelModule) } override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) ... ... moduleId = intent.getString("module_id") levelModule = intent.getParcelable("level