📅  最后修改于: 2022-03-11 14:54:16.836000             🧑  作者: Mango
代码示例2
// add this piece of code in onCreate method
viewmodel = ViewModelProviders.of(this).get(SettingsViewModel::class.java)