ListView random IndexOutOfBoundsException on Froyo
http://stackoverflow.com/questions/8431342/listview-random-indexoutofboundsexception-on-froyo
今天遇到个
AndroidRuntime E java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
AndroidRuntime E at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:257)
类似的问题,stackoverflow上是如此解决的:
class MyFixedListView extends ListView {
@Override
protected void dispatchDraw(Canvas canvas) {
try {
super.dispatchDraw(canvas);
} catch (IndexOutOfBoundsException e) {
// samsung error
}
}
}
ListView random IndexOutOfBoundsException on Froyo的更多相关文章
- 安卓menu的介绍与使用
菜单之前是用户点击系统的菜单键才展示出来的,后来这个键渐渐被移除,菜单变成了点击任意的view都可以展示.菜单非为3种: 1.Options menu and action bar 选项菜单和操作栏 ...
- listview 遇到问题java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
开发的时候 遇到 java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0 这个异常有时候会有,有时候正常 不太好捕捉 猜测 已经 ...
- C#使用ListView更新数据出现闪烁解决办法
C#使用ListView更新数据出现闪烁解决办法 在使用vs自动控件ListView控件时候,更新里面的部分代码时候出现闪烁的情况 如图: 解决以后: 解决办法使用双缓冲:添加新类继承ListView ...
- Android ListView 多样式Item的一个注意点:(
闲来无事,在写一个多样式Item的ListView的Demo时,遇到了一个以前没遇过的问题; ╮( ̄▽ ̄")╭ 我们知道,ListView里可以有多种样式的item, 实现只需要重写: @O ...
- FireMonkey ListView 自动计算行高
说明:展示 ListView 视其每一行 Item 的 Detail 字串长度自动调整高度(可每行高度不同). 适用:Delphi XE7 / XE8 源码下载:[原创]ListView_自动计算行高 ...
- java攻城狮之路(Android篇)--ListView与ContentProvider
一.ListView 1.三种Adapter构建ListView ListView添加条目的时候, 可以使用setAdapter(ListAdapter)方法, 常用的ListAdapter有三种 B ...
- 重新想象 Windows 8.1 Store Apps (93) - 控件增强: GridView, ListView
[源码下载] 重新想象 Windows 8.1 Store Apps (93) - 控件增强: GridView, ListView 作者:webabcd 介绍重新想象 Windows 8.1 Sto ...
- Android 自定义ScrollView ListView 体验各种纵向滑动的需求
分类: [android 进阶之路]2014-08-31 12:59 6190人阅读 评论(10) 收藏 举报 Android自定义ScrollView纵向拖动 转载请标明出处:http: ...
- ListView Animation
简单介绍一下4种动画效果方式AnimationSet set = new AnimationSet(false); Animation animation = new AlphaAnimation(0 ...
随机推荐
- erlang lists模块函数使用大全
转自:http://qqdenghaigui.iteye.com/blog/1554541 一,带函数Pred1, all(Pred, List) -> boolean()如果List中的每个元 ...
- (1)Two Sum--求数组中相加为指定值的两个数
Given an array of integers, find two numbers such that they add up to a specific target number. The ...
- python_变量的命名规则
python 变量的命名规则: 1. 要具有描述性 2.变量名只能由 数字,字母 ,下划线 组成,不可以是空格或者特殊字符(#!%……&) 3.不能以数字开头 4.保留字符不可用(print ...
- input type="file" 的一些问题
file可以上传文件,但通常 情况下大家都会需要设置文件上传的格式 上传文件的格式由一个 accept 属性来控制 列如: <input type="file" id=&qu ...
- 使用putty上传文件到linux系统
使用window的cmd命令 上传文件到linux 使用putty下的 pscp.exe pscp -r -l root -pw 1234567890 e:/htk 192.168.0.204:/r ...
- hdu_2665_Kth number(主席树)
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=2665 题意:给你一个区间,让你找这个区间第K大的数 题解:主席树模版题,也可以用划分树 #includ ...
- Box of Bricks
Box of Bricks Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other) Total ...
- nginx配置错误
重启nginx:sudo /usr/local/nginx/sbin/nginx -s reload 出现错误提示:nginx: [emerg] unknown directive "if& ...
- Myeclipse8.6安装freemarker插件
1. 打开http://sourceforge.net/projects/freemarker-ide/files/ 下载最新版本,目前本人下载时最新版本是:freemarker-ide-0.9.14 ...
- centos 6.2安装bind 9.8.2 master、slave与自动修改后更新
原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://dl528888.blog.51cto.com/2382721/1249311 随 ...