本月博客排行
-
第1名
hanbaohong -
第2名
silverend -
第3名
jh108020 - arpenker
- java-007
年度博客排行
-
第1名
龙儿筝 -
第2名
宏天软件 -
第3名
wy_19921005 - 青否云后端云
- benladeng5225
- vipbooks
- kaizi1992
- e_e
- arpenker
- tanling8334
- sam123456gz
- zysnba
- fantaxy025025
- xiangjie88
- lemonhandsome
- wallimn
- ganxueyun
- Xeden
- zhanjia
- wangchen.ily
- xyuma
- jh108020
- johnsmith9th
- zxq_2017
- jbosscn
- forestqqqq
- daizj
- ajinn
- xpenxpen
- 喧嚣求静
- silverend
- kingwell.leng
- kristy_yy
- lchb139128
- jveqi
- lzyfn123
- javashop
- java-007
- sunj
- yeluowuhen
- lerf
- xiaoxinye
- flashsing123
- chenqisdfx
- bosschen
- zhangjijun
- lyndon.lin
- sunnylocus
- lyj86
- paulwong
最新文章列表
用BaseAdapter时,在ListView的onItemClick方法狂报 ClassCastException:java.lang.Boolean
原因:
通常在使用simpleCursorAdapter的listview中的onItemClick方法中,
使用Cursor cursor = (Cursor)listView.getItemAtPosition(position);可以的到改位置的cursor,
但如果使用BaseAdapter,由于我们重写了
@Override
public Object getItem(int ...
Android 关于嵌套listView时onItemClick事件不响应的解决办法
当我们使用listView嵌套button或者其它clickable控件时会出现listView的onitemClick事件不响应的问题。我们只需要在item的xml文件中的根布局中加上一句:
android:descendantFocusability="blocksDescendants"
屏蔽item中抢夺focus的控件权限即可解决问题。