java.lang.ClassCastException: android.widget.HeaderViewListAdapter cannot be cast to com.android.mms
来源:互联网 发布:社工数据库 编辑:程序博客网 时间:2024/05/01 18:48
解决方案:
ListView listView = getListView();
//ConversationListAdapter adapter = (ConversationListAdapter) listView.getAdapter();
ConversationListAdapter adapter = null;
if(listView.getAdapter() instanceof HeaderViewListAdapter) {
HeaderViewListAdapter listAdapter=(HeaderViewListAdapter)listView.getAdapter();
adapter = (ConversationListAdapter) listAdapter.getWrappedAdapter();
} else {
adapter = (ConversationListAdapter) listView.getAdapter();
}
- 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 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: java.lang.ClassCastException: android.widget.imageView cannot be cast to android.widget.tex
- java.lang.ClassCastException: android.widget.LinearLayout cannot be cast to android.widget.TextView
- java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.EditText
- java.lang.ClassCastException: android.widget.ImageView cannot be cast to android.widget.TextView解决办法
- java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.LinearLayout
- java.lang.ClassCastException: android.widget.RelativeLayout$LayoutParams cannot be cast to android.widget.AbsListView$LayoutPara
- java.lang.ClassCastException~android.widget.ImageView cannot be cast to android.widget.Button~
- Caused by: java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.Bu
- PAT结构分析
- 线段树--hdoj1754
- 14条建议,使你的IT职业生涯更上一层楼
- jstl <fmt:formatDate>标签
- HDU 1213 并查集
- java.lang.ClassCastException: android.widget.HeaderViewListAdapter cannot be cast to com.android.mms
- ipdb
- VC++6.0中各种文件的作用
- 直接拿来用!最火的Android开源项目(一)
- c/c++ api mysql_query()返回值
- 职业设计生涯:打造世界上最小巧最强大手电
- 头文件在编译过程中的作用
- 二叉排序树的简单实现
- cocos2d-x在android下添加多盟插屏广告