无限上拉下拉XlistView 有时候就会出现 适配器内容已经改变,但列表视图没有收到通知。求解,为什么!内有详细说明。
来源:互联网 发布:中国臭氧层空洞知乎 编辑:程序博客网 时间:2024/04/29 05:17
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);
}
0 0
- 无限上拉下拉XlistView 有时候就会出现 适配器内容已经改变,但列表视图没有收到通知。求解,为什么!内有详细说明。
- 安卓中适配器的内容已经改变但ListView没有收到通知。确保您的适配器的内容不在后台线程
- XListView上拉下拉
- 上拉下拉刷新XListView
- XListView+ViewPager+上拉下拉
- XListview 上拉下拉刷新
- android之XListview,上拉下拉出现BUG
- xlistview的使用(上拉下拉)
- Android之xListView网络请求上拉下拉加载
- 轮播图加载Imageloader图片,Xlistview上拉下拉
- Tablayout与Viewpager里添加Xlistview实现上拉下拉
- DrawerLayout侧滑+Image-Loader+XListView+上拉下拉 Y
- GPIO的上拉下拉功能说明
- GPIO的上拉下拉功能说明
- GPIO的上拉下拉功能说明
- GPIO的上拉下拉功能说明
- GPIO的上拉下拉功能说明
- GPIO的上拉下拉功能说明
- 请问Android中怎么在一个线性布局里面添加多个图表控件
- AppStore提示iOS版本太低不能下载这个提示怎么做的?
- 请高手帮帮菜鸟,谢谢!
- 对类似Tab页面下的Listview滑动时,隐藏Tab导航
- ListView点击Item为什么文字不会变色了,CheckBox 是黑色的
- 无限上拉下拉XlistView 有时候就会出现 适配器内容已经改变,但列表视图没有收到通知。求解,为什么!内有详细说明。
- 关于LinerrLayout问题,总是出现"LinearLayout" must be followed by the ' = ' character.
- 关于Location
- Android studio1.0安装问题
- 嵌入式asp网页,include不生效
- 特征向量的几何意义
- 这样的网址是怎么做的?
- 关于boolean有个疑问 ,请看注释,求各路大神指教
- 使用httpClient4.5的问题 求大家来看看..不知道怎么解决