ListView这样设置竟然导致BaseAdapter.getView疯狂执行

今天自定义ListView的BaseAdapt,却惊人发现如果在XML中ListView如下设置:

<ListView android:id="@+id/place_list" android:layout_height="wrap_content" android:layout_width="wrap_content" ></ListView>

那么listView对应的BaseAdapter中的getView方法会疯狂地执行(不停执行),目前我还不清楚原因,如果哪位知道为什么,可以评论告诉我,不胜感谢!!

当我把设置改成

<ListView android:id="@+id/place_list" android:layout_height="match_parent" android:layout_width="match_parent" ></ListView>

那么listView对应的BaseAdapter中的getView方法执行就正常了,what happened!shen me gui!花了很长时间找答案,却在无意中解决了,在疑惑之余又感觉很兴奋,,这就是编程经验!!

朋友,为了幸福,请你保持一副热爱生活的心肠,

ListView这样设置竟然导致BaseAdapter.getView疯狂执行

相关文章:

你感兴趣的文章:

标签云: