您的位置:首页 > 其它

无限上拉下拉XlistView 有时候就会出现 适配器内容已经改变,但列表视图没有收到通知。求解,为什么!内有详细说明。

2017-01-02 07:29 375 查看
1.当我上拉或者下拉XlistView的时候  我在上拉下拉方法中启动查询数据的线程。

2.线程查询的数据不为空的时候,给适配器适配数据。

3.适配如下:  传过去两个list    当你一直上拉或者下拉的时候就会报  适配器内容已经改变 但列表视图没收到通知了

               if (commentAdapter == null) {

commentAdapter = new CommentAdapter(this, list_comment, list_comment_child);

lv_user_comments.setAdapter(commentAdapter);

lv_user_comments.setPullRefreshEnable(true);

}else{

commentAdapter.notifyDataSetChanged();

lv_user_comments.setPullRefreshEnable(true);

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐