当前位置:网站首页>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!!)
}
边栏推荐
- 关于数据库数据转移的问题,求各位解答下
- Maze games based on JS
- 剑指offer-高质量的代码
- 异步组件和Suspense(真实开发中)
- toRefs API 与 toRef Api
- Redhat5 installing vmware tools under virtual machine
- How can flinksql calculate the difference between a field before and after update when docking with CDC?
- 2018年江苏省职业院校技能大赛高职组“信息安全管理与评估”赛项任务书第一阶段答案
- 从零到一,教你搭建「CLIP 以文搜图」搜索服务(二):5 分钟实现原型
- Config distributed configuration center
猜你喜欢
Esxi attaching mobile (Mechanical) hard disk detailed tutorial
AVL树的实现
Complete process of MySQL SQL
2018年江苏省职业院校技能大赛高职组“信息安全管理与评估”赛项任务书
MOS tube parameters μ A method of Cox
LC interview question 02.07 Linked list intersection & lc142 Circular linked list II
.net core 访问不常见的静态文件类型(MIME 类型)
JDBC database connection pool usage problem
MYSQL----导入导出&视图&索引&执行计划
网络基础 —— 报头、封装和解包
随机推荐
大咖云集|NextArch基金会云开发Meetup来啦
Composition API 前提
Multidisciplinary integration
Please ask a question, flick Oracle CDC, read a table without update operation, and repeatedly read the full amount of data every ten seconds
Matlab tips (30) nonlinear fitting lsqcurefit
企業如何進行數據治理?分享數據治理4個方面的經驗總結
Advantages of using net core / why
Config distributed configuration center
Leetcode T1165: 日志分析
【NOI模拟赛】区域划分(结论,构造)
Special behavior of main function in import statement
JDBC database connection pool usage problem
Answer to the first stage of the assignment of "information security management and evaluation" of the higher vocational group of the 2018 Jiangsu Vocational College skills competition
Multithreading and high concurrency (9) -- other synchronization components of AQS (semaphore, reentrantreadwritelock, exchanger)
途家、木鸟、美团……民宿暑期战事将起
How can gyms improve their competitiveness?
The startup of MySQL installed in RPM mode of Linux system failed
Sword finger offer high quality code
What books can greatly improve programming ideas and abilities?
Exception of DB2 getting table information: caused by: com ibm. db2.jcc. am. SqlException: [jcc][t4][1065][12306][4.25.13]