当前位置:网站首页>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!!)
}
边栏推荐
- Knight defeats demon king (Backpack & DP)
- HKUST & MsrA new research: on image to image conversion, fine tuning is all you need
- 开发者别错过!飞桨黑客马拉松第三期链桨赛道报名开启
- string(讲解)
- 当前发布的SKU(销售规格)信息中包含疑似与宝贝无关的字
- 循环肿瘤细胞——Abnova 解决方案来啦
- 基于FPGA的VGA协议实现
- How to solve sqlstate[hy000]: General error: 1364 field 'xxxxx' doesn't have a default value error
- LM11丨重构K线构建择时交易策略
- Symmetric binary tree [tree traversal]
猜你喜欢

Common problems of caching in high concurrency scenarios

MySQL的安装
![[SOC FPGA] custom IP PWM breathing lamp](/img/4b/5053137cf95e851ca89057e9b9c15c.jpg)
[SOC FPGA] custom IP PWM breathing lamp

「运维有小邓」符合GDPR的合规要求

【OpenCV】形态学滤波(2):开运算、形态学梯度、顶帽、黑帽

屏幕程序用串口无法调试情况

Implementation of VGA protocol based on FPGA

当前发布的SKU(销售规格)信息中包含疑似与宝贝无关的字

Redis (I) -- getting to know redis for the first time

Tkinter window selects PCD file and displays point cloud (open3d)
随机推荐
项目实战 五 拟合直线 获得中线
基于FPGA的VGA协议实现
Navicat导入15G数据报错 【2013 - Lost connection to MySQL server during query】 【1153:Got a packet bigger】
C interview 24 (pointer) define a double array with 20 elements a
Crudini profile editing tool
Pinduoduo lost the lawsuit: "bargain for free" infringed the right to know but did not constitute fraud, and was sentenced to pay 400 yuan
开发者别错过!飞桨黑客马拉松第三期链桨赛道报名开启
360 Zhiyu released 7.0 new products to create an exclusive "unified digital workspace" for the party, government and army, and central and state-owned enterprises
dolphinscheduler3.x本地启动
字符串常量与字符串对象分配内存时的区别
Go straight to the 2022ecdc fluorite cloud Developer Conference: work with thousands of industries to accelerate intelligent upgrading
[start from scratch] detailed process of deploying yolov5 in win10 system (CPU, no GPU)
Calculation model FPS
对称的二叉树【树的遍历】
POI导出Excel:设置字体、颜色、行高自适应、列宽自适应、锁住单元格、合并单元格...
MySQL的安装
Unity C# 函数笔记
港科大&MSRA新研究:关于图像到图像转换,Fine-tuning is all you need
面试中有哪些经典的数据库问题?
JWT certification