码迷,mamicode.com
首页 > 其他好文 > 详细

ListView random IndexOutOfBoundsException on Froyo

时间:2014-12-25 14:25:01      阅读:150      评论:0      收藏:0      [点我收藏+]

标签:

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

标签:

原文地址:http://www.cnblogs.com/androidsuperman/p/4184447.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!