1Caused by: java.lang.IndexOutOfBoundsException: Invalid index 2, size is 2
2 at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
3 at java.util.ArrayList.get(ArrayList.java:308)
4 at com.mama100.android.member.activities.message.adapter.MessageListAdapter.getItem(MessageListAdapter.java:86)
5 at com.mama100.android.member.activities.message.MessageListActivity.onActivityResult(MessageListActivity.java:651)
修改前:
MsgTable msg = ((MsgTable) mMsgListAdatper.getItem(location));
修改后:
MsgTable msg = mMsgListAdatper.getList().get(location);
原因是:listView加了头部跟底部哇 证据如下 这里要注意呢
mAbPullListView.getHeaderView().setHeaderProgressBarDrawable(
getResources().getDrawable(R.drawable.progressbar_loading_anim));
mAbPullListView.getFooterView().setFooterProgressBarDrawable(
getResources().getDrawable(R.drawable.progressbar_loading_anim));
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。