首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

ListView中内容长短不一以致有些Item不好点击

2013-12-13 
ListView中内容长短不一导致有些Item不好点击如题,因为ListView中的item是动态加载的,有的比较短,就不容易

ListView中内容长短不一导致有些Item不好点击
如题,因为ListView中的item是动态加载的,有的比较短,就不容易触发点击事件,这个怎么解决呢?
[解决办法]
设置一下项的宽度为 fill_parent 试试
[解决办法]
我在StackOverFlow看到和你一样的问题:android: listview item width fill_parent doesnt work
http://stackoverflow.com/questions/4552977/android-listview-item-width-fill-parent-doesnt-work

解决答案是:
How are you creating your ListView? Is it defined in XML? Are you using a ListActivity? Or are you creating it programmatically? You need to make sure that the ListView itself has a width of fill_parent.

热点排行