当前位置:网站首页>ViewModelProvider. Of obsolete solution
ViewModelProvider. Of obsolete solution
2022-07-07 07:07:00 【Dream of changing life】
Outdated methods
open fun <T : ViewModel?> createViewModel(activity: FragmentActivity?, cls: Class<T>?): T {
return ViewModelProviders.of(activity!!).get(cls)
}
Replace with
open fun <T : ViewModel?> createViewModel(activity: FragmentActivity?, cls: Class<T>?): T {
return ViewModelProvider(activity!!).get(cls!!)
}
边栏推荐
猜你喜欢

MySQL的主从复制原理

How to share the same storage among multiple kubernetes clusters

Config分布式配置中心

How can clothing stores make profits?

如何给目标机器人建模并仿真【数学/控制意义】

Four goals for the construction of intelligent safety risk management and control platform for hazardous chemical enterprises in Chemical Industry Park

Matlab tips (30) nonlinear fitting lsqcurefit

Unity3d learning notes
![Stack and queue-p79-10 [2014 unified examination real question]](/img/7f/e5bba2f64bb77e1781076361c32f01.jpg)
Stack and queue-p79-10 [2014 unified examination real question]

. Net 5 fluentftp connection FTP failure problem: this operation is only allowed using a successfully authenticated context
随机推荐
根据IP获取地市
toRefs API 与 toRef Api
Prime partner of Huawei machine test questions
Four goals for the construction of intelligent safety risk management and control platform for hazardous chemical enterprises in Chemical Industry Park
From zero to one, I will teach you to build the "clip search by text" search service (2): 5 minutes to realize the prototype
MySQL user permissions
ESXI挂载移动(机械)硬盘详细教程
Libcurl returns curlcode description
Can 7-day zero foundation prove HCIA? Huawei certification system learning path sharing
企業如何進行數據治理?分享數據治理4個方面的經驗總結
Master-slave replication principle of MySQL
How to install swoole under window
2022年全国所有A级景区数据(13604条)
算法---比特位计数(Kotlin)
from . onnxruntime_ pybind11_ State Import * noqa ddddocr operation error
Maze games based on JS
组件的通信
Composition API 前提
非父子组件的通信
How DHCP router works