The method setBackgroundDrawable(Drawable) from the type View is deprecated

这表示方法:setBackgroundDrawable(Drawable)已被遗弃,用setBackgroundResource(resid)替换即可,并且使用更方便

eg:

button[initial_i][initial_j].setBackgroundResource(R.drawable.hero);
时间: 2025-01-15 00:28:59

The method setBackgroundDrawable(Drawable) from the type View is deprecated的相关文章

The method dismissDialog(int) from the type Activity is deprecated

The method showDialog(int) from the type Activity is deprecated in android? up vote6down votefavorite The method showDialog(int) from the type Activity is deprecated. What's the reason? and how to solve it? 7down voteaccepted What's the reason? http:

hibernate3和4中 HibernateSessionFactory中不同之处 The method applySettings(Map) from the type ServiceRegistryBuilder is deprecated - The type ServiceRegistryBuilder is deprecated

hibernate3和4中 HibernateSessionFactory中不同之处 //serviceRegistry = new ServiceRegistryBuilder().applySettings(configuration.getProperties()).buildServiceRegistry(); 新的写法 serviceRegistry = new ServiceRegistryBuilder().applySettings(configuration.getProper

力所能及之The method setOnClickListener(View.OnClickListener) in the type View is not

开始学习android了,写监听器老是报错,不知道为什么,翻了翻度娘 The method setOnClickListener(View.OnClickListener) in the type View is not 这种问题在调用文件上引入import android.view.View.OnClickListener; 解决!

The method sendKeys(CharSequence[]) in the type WebElement is not applicable for the arguments (String)

写了一段测试代码运行时一直报错:The method sendKeys(CharSequence[]) in the type WebElement is not applicable for the arguments (String) 测试代码: driver.findElement(By.name("wd")).sendKeys("selnium"); 原因:旧版本的Java不理解非随机变量参数 解决方法:在工程上点击右键选择Build Path -> 

Access restriction: The method createJPEGEncoder(OutputStream) from the type JPEGCodec is not access

准备使用Java进行图片压缩的时候,使用 import com.sun.image.codec.jpeg.*; 结果出现错误: Access restriction: The method createJPEGEncoder(OutputStream) from the type JPEGCodec is not accessible due to restriction on required library 上网查了一下,发现是IDE的设置问题,它默认把这些受访问限制的API设成了ERROR

Mapper method 'com.autoyol.mapper.trans.AccountLogMapper.getTotalIncomByMemNoLastest attempted to return null from a method with a primitive return type (int).解决方法

1.打开日志输出,降低日志级别. <AppenderRef ref="console" level="trace"></AppenderRef> 否则看不到报错.. 2.调整mysql语句,不能使用order by limit之类的 <!-- SELECT IFNULL(amt,1) FROM account_log WHERE mem_no=#{value} AND income_type != 4 ORDER BY id DESC

Undefined function or method &#39; &#39; for input arguments of type &#39;double&#39; ---错误解决办法

你如果要使用这个guo.m作为函数进行调用的话,那需要满足以下条件: 1.在guo.m里面要写成function的格式 function [output parmaters]=guo[input parameters] 2.拥有这个function的m文件的文件名要与这个函数名称一致,意思就是文件名要为 guo.m 3.调用这个function的m文件要与guo.m处于同一工作目录下 4.输入输出参数类型要与函数内部要求的类型一致 Undefined function or method ' '

The method setItems(String) in the type ForTokensTag is not applicable for the arguments (Object)

1. 问题 看到这个错误以为是貌似jsp页面有误,c:forTokens标签用错了?? An error occurred at line: 444 in the jsp file: /WEB-INF/pages/countOrder/viewCountOrderDetails.jsp The method setItems(String) in the type ForTokensTag is not applicable for the arguments (Object) 441: </t

attempted to return null from a method with a primitive return type (int).

错误信息: attempted to return null from a method with a primitive return type (int). 错误原因:实际查询sql并没有这个值,出现空值,就会报这个异常. 错误sql(发生问题): select sum(id) from post where post.author = ? 正确sql(解决问题): select IFNULL(sum(id),0) from post where post.author = ? 关键在于使用