android listview中getView重复被调用的问题
getView被调用的次数取决于当前屏幕能显示的item的数量,显示一个item就调用一次。当listview的layout_height属性是wrap_content时,有可能造成listview无法计算高度,相应的需要显示的item数量就无法计算,造成getView多次被调用。
解决方案: 把 listview中 height属性 设为 fill_parent 或定值,及 item xml中 所有组件 的layout_height 都不要用wrap_content .
转载自:http://blog.youkuaiyun.com/jdsjlzx/article/details/8463560