TextView在setText()时提示出错
来源:互联网 发布:lego moc 搭建软件 编辑:程序博客网 时间:2024/06/08 14:10
在自定义Adaper内的getView方法里为textView设置内容时提示:
android.content.res.Resources$NotFoundException: String resource ID #0x17
相关代码: textView3.setText(musers.get(position).getAge()) ;
原来musers.get(position).getAge()返回为int类型,而setText方法就会调用 setText(int resid)这个方法,而不是 setText(CharSequence text),所以出现错误。只需将int转为String类型即可。我们可以这样textView3.setText(""+musers.get(position).getAge()) ;- TextView在setText()时提示出错
- TextView.setText()为什么会出错
- TextView的setText方法出错
- TextView.setText()为什么会出错
- android textview settext 问题
- textview的settext
- android.widget.TextView.setText()
- TextView的setText方法
- TextView.setText使用错误
- android TextView.setText
- TextView.setText时参数只能是字符/字符串
- TextView里的setText方法
- android-textview-settext()输出数字
- TextView.setText() throwing NullPointerException问题
- TextView里的setText方法 .
- TextView setText()无效的问题解决
- TextView采用setText赋值之后不能立即显示在页面上的问题解决
- android 在线程中run()中添加修改UI,setText出错
- perl 符号表
- VC++------------为CListBox加上智能水平滚动条
- VC++6.0与VS的区别(代码移植中发现的区别,待添加)
- 对共享中断理解
- 类中的属性
- TextView在setText()时提示出错
- sed
- ARM linux strace 安装
- s3c2410调试串口改成普通串口
- HTTP错误代码详细介绍
- 回归(regression)、梯度下降(gradient descent)
- Android中Activity启动的方式
- hdu 2063 二分图匹配
- can't create transaction lock on /var/lib/rpm/.rpm.lock 错误