我一直在尝试在 Activity 中创建 ViewModel 对象,但不推荐使用 ViewModelProviders 那么创建 ViewModel 对象的替代方法是什么。
android viewmodel
android ×1
viewmodel ×1