首页 > 其他 > 详细

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

时间:2015-03-30 09:27:50      阅读:100      评论:0      收藏:0      [点我收藏+]

今天自定义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疯狂执行

原文:http://blog.csdn.net/u010571316/article/details/44731931

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!