当前位置:网站首页>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!!)
}
边栏推荐
- [solution] final app status- undefined, exitcode- 16
- Markdown displays pictures side by side
- 哈趣投影黑马之姿,仅用半年强势突围千元投影仪市场!
- [FPGA] EEPROM based on I2C
- Unity C# 函数笔记
- Overview of FlexRay communication protocol
- JMeter's own functions are not enough? Why don't you develop one yourself
- Redis (I) -- getting to know redis for the first time
- How to find the literature of a foreign language journal?
- Which foreign language periodicals are famous in geology?
猜你喜欢
Redis (I) -- getting to know redis for the first time
Unable to debug screen program with serial port
地质学类比较有名的外文期刊有哪些?
Ideas of high concurrency and high traffic seckill scheme
Three updates to build applications for different types of devices | 2022 i/o key review
Leite smart home longhaiqi: from professional dimming to full house intelligence, 20 years of focus on professional achievements
CloudCompare-点对选取
屏幕程序用串口无法调试情况
「解析」FocalLoss 解决数据不平衡问题
ICML 2022 | 探索语言模型的最佳架构和训练方法
随机推荐
693. Travel sequencing
Redis(二)—Redis通用命令
Overview of FlexRay communication protocol
How to use wechat cloud hosting or cloud functions for cloud development of unapp development applet
ETCD数据库源码分析——从raftNode的start函数说起
Go straight to the 2022ecdc fluorite cloud Developer Conference: work with thousands of industries to accelerate intelligent upgrading
Software testing knowledge reserve: how much do you know about the basic knowledge of "login security"?
[start from scratch] detailed process of deploying yolov5 in win10 system (CPU, no GPU)
Abnova 免疫组化服务解决方案
软件测试到了35岁,真的就干不动了吗?
matlab / ENVI 主成分分析实现及结果分析
基于ADAU1452的DSP及DAC音频失真分析
"Parse" focalloss to solve the problem of data imbalance
Party A's requirements for those who have lost 800 yuan
线性代数(一)
MySQL (x)
String (explanation)
3531. Huffman tree
C语言整理(待更新)
Linear algebra (1)