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);
}
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);
}