当前位置:网站首页>ViewModelProvider.of 过时方法解决
ViewModelProvider.of 过时方法解决
2022-07-07 02:14:00 【梦想改变生活】
过时方法
open fun <T : ViewModel?> createViewModel(activity: FragmentActivity?, cls: Class<T>?): T {
return ViewModelProviders.of(activity!!).get(cls)
}
替换成
open fun <T : ViewModel?> createViewModel(activity: FragmentActivity?, cls: Class<T>?): T {
return ViewModelProvider(activity!!).get(cls!!)
}
边栏推荐
- MySQL installation
- Knight defeats demon king (Backpack & DP)
- 「解析」FocalLoss 解决数据不平衡问题
- 请问如何查一篇外文文献的DOI号?
- Performance comparison between Ceres solver and g2o
- Abnova循环肿瘤DNA丨全血分离,基因组DNA萃取分析
- js装饰器@decorator学习笔记
- Force deduction 62 different paths (the number of all paths from the upper left to the lower right of the matrix) (dynamic planning)
- Learning notes | data Xiaobai uses dataease to make a large data screen
- Handling hardfault in RT thread
猜你喜欢
Markdown displays pictures side by side
dolphinscheduler3. X local startup
Redis (II) - redis General Command
Force deduction 62 different paths (the number of all paths from the upper left to the lower right of the matrix) (dynamic planning)
Pinduoduo lost the lawsuit: "bargain for free" infringed the right to know but did not constitute fraud, and was sentenced to pay 400 yuan
请问如何查一篇外文文献的DOI号?
Navicat importing 15g data reports an error [2013 - lost connection to MySQL server during query] [1153: got a packet bigger]
Etcd database source code analysis -- starting from the start function of raftnode
BindingException 异常(报错)处理
[SOC FPGA] peripheral PIO button lights up
随机推荐
拼多多败诉:“砍价免费拿”侵犯知情权但不构成欺诈,被判赔400元
请问如何查一篇外文文献的DOI号?
博士申请 | 上海交通大学自然科学研究院洪亮教授招收深度学习方向博士生
[solution] final app status- undefined, exitcode- 16
string(讲解)
MySQL installation
Laravel uses Tencent cloud cos5 full tutorial
地质学类比较有名的外文期刊有哪些?
VIM mapping large K
【从零开始】win10系统部署Yolov5详细过程(CPU,无GPU)
「解析」FocalLoss 解决数据不平衡问题
c语言(结构体)定义一个User结构体,含以下字段:
谷歌 Chrome 浏览器发布 103.0.5060.114 补丁修复 0-day 漏洞
JWT certification
dolphinscheduler3. X local startup
c语言面试写一个函数在字符串N中查找第一次出现子串M的位置。
如何解决数据库插入数据显示SQLSTATE[HY000]: General error: 1364 Field ‘xxxxx‘ doesn‘t have a default value错误
Redis (I) -- getting to know redis for the first time
JMeter function assistant - random value, random string, fixed value random extraction
How can I check the DOI number of a foreign document?