Andriod: The method getDrawable(int) from the type Resources is deprecated,一系列问题
来源:互联网 发布:织梦cms个人博客模板 编辑:程序博客网 时间:2024/06/06 09:21
【问题】
如下android代码:
Drawable statusQuestionDrawable = resources.getDrawable(R.drawable.status_question); statusView.setBackgroundDrawable(statusQuestionDrawable);
结果提示:
The method setBackgroundDrawable(Drawable) from the type View is deprecated
【解决过程】
1.很明显是该函数被废弃了。
但是换成啥,目前不知道。
2、鼠标放在此函数上,弹出的提示窗口,点击替换栏。
3、鼠标再次放在此函数上,就可以看到关于此函数的替代方案,以及相关解释。
阅读全文
0 0
- Andriod: The method getDrawable(int) from the type Resources is deprecated,一系列问题
- The method setBackgroundDrawable(Drawable) from the type View is deprecated
- The method show() from the type Window is deprecated
- The method buildSessionFactory() from the type Configuration is deprecated
- The method showDialog(int) from the type Activity is deprecated-android旧版dialog不能用的问题
- getDrawable(int) is deprecated
- The method assertEquals(double, double) from the type Assert is deprecated
- The method saveErrors(HttpServletRequest,ActionErrors)from the type Action is deprecated
- 获取显示窗口警告 android The method getWidth() from the type Display is deprecated
- setBackgroundDrawable提示:The method setBackgroundDrawable(Drawable) from the type View is deprecated
- 'getDrawable(int)' is deprecated,getDrawable过时
- Access restriction: The method getCombiningClass(int) from the type Normalizer is not accessible due
- The method setDefaultCloseOperation(int) is undefined for the type
- The type Contacts is deprecated
- The type SmsMessage is deprecated
- The type SmsMessage is deprecated
- The type MultipartEntity is deprecated
- The type ActionBarActivity is deprecated
- 哈希表模拟#define
- 请求发送者与接收者解耦——命令模式(五)
- 科普:为什么手机摄像头在追求到2000万像素之后反正往回倒退到1200万像素发展了?
- C语言
- 【Anti-Nim】BZOJ1022(SHOI2008)[小约翰的游戏John]题解
- Andriod: The method getDrawable(int) from the type Resources is deprecated,一系列问题
- scipy运用
- 一种排序
- 自顶向下,逐步求精
- java面试指南
- 共享链小程序开发源码分析
- JAVA项目视频
- Java虚拟机学习之Java内存区域与内存溢出异常
- 阿里面试内容