cannot be cast to android.widget.HeaderViewListAdapter
来源:互联网 发布:知乎什么叫禁欲脸女生 编辑:程序博客网 时间:2024/05/01 11:43
页面listview根本没用headerview,但是报了这个错误:
exception=java.lang.ClassCastException: com.zkrkj.peoplehospital.registered.RegisteredHistory$ListRegisteredHistory cannot be cast to android.widget.HeaderViewListAdapter
看到好久不知道到底出在哪里,最后想到listview结合SwipeRefreshLoadLayout实现上拉加载下拉刷新,应该是在SwipeRefreshLoadLayout这个空间中用到了,打开果不其然看到了headerview的影子。最后发现swipRefresh.setLoading(false);导致的错误,当setLoading(true)后,如果没有设置为false,判定headerview不为null,然后走headerview代码块。
0 0
- cannot be cast to android.widget.HeaderViewListAdapter
- cannot be cast to android.widget.HeaderViewListAdapter
- cannot be cast to android.widget.HeaderViewListAdapter
- cannot be cast to android.widget.HeaderViewListAdapter
- cannot be cast to android.widget.HeaderViewListAdapter
- cannot be cast to android.widget.HeaderViewListAdapter
- cannot be cast to android.widget.HeaderViewListAdapter
- android.widget.HeaderViewListAdapter cannot be cast to ***
- [android] cannot be cast to android.widget.HeaderViewListAdapter
- Error: cannot be cast to android.widget.HeaderViewListAdapter
- 奇葩问题cannot be cast to android.widget.HeaderViewListAdapter
- cannot be cast to android.widget.HeaderViewListAdapter源码分析
- java.lang.ClassCastException: android.widget.HeaderViewListAdapter cannot be cast to com.android.mms
- 异常 java.lang.ClassCastException:cannot be cast to android.widget.HeaderViewListAdapter.的解决方法
- cannot be cast toandroid.widget.HeaderViewListAdapter
- android.widget.HeaderViewListAdapter canot be cast xxxx
- android.widget.Button cannot be cast to android.widget.Gallery
- widget.Button cannot be cast to android.widget.ListView
- POJ 1182 食物链
- 图吧导航SDK在物流行业中HUD的应用
- python 封装3des加解密库
- RabbitMQ(六):使用主题进行消息分发
- 使用console调试JavaScript(二)
- cannot be cast to android.widget.HeaderViewListAdapter
- OW+框架的个人理解
- 收藏的链接
- GET和POST提交数据方式的区别和使用
- python判断一个字符是不是在一个字符串中关键字in ,not in
- QT 子窗口获取父窗口指针的方法
- 切换控制器的时候隐藏搜索栏按钮,隐藏键盘,取消第一响应
- Cfile的小BUG
- 相机对焦原理