1.使用static 的ViewHolder 可以优化ListView性能近50%
2. OOM如果你的Item是自定义的Item的话,例如你的自定义Item布局ViewGroup中包含:按钮、图片、flash、CheckBox、 RadioButton等一系列你能想到的控件的话, 你要在getView中单单使用ViewHolder是远远不够的如果数据过多,加载的 图片过多过大,你BitmapFactory.decode的猛多的话,OOM!!!! ---出自http://mzh3344258.blog.51cto.com/1823534/889879
3、ListView中getView的原理与解决多轮重复调用的方法--- http://blog.youkuaiyun.com/hupuxiang/article/details/7420674
4、RecycleBin 参看android源码:android.widget.AbsListView.RecycleBin
5.如果不设置listview为固定大小(fillparent、XXdp) 将会出现多次调用getView方法-----"Never set the layout_height and layout_width of your listview to wrap_content as getView() will force your adapter to get some child for measuring the height of the views to be drawn in list view and can cause some unexpected behaviour like returning convertview even the list is not scrolled.always use match_parent or fixed width/height."

参考文章:eoe: Adapter中getView参数convertView问题 : http://www.eoeandroid.com/thread-319764-1-1.html
ViewHolder模式: http://blog.youkuaiyun.com/djcken/article/details/7658871
stackoverflow: http://stackoverflow.com/questions/11945563/how-listviews-recycling-mechanism-works
ListView recycleler机制详解:http://cmsbai.blog.51cto.com/330479/1184272
本文介绍如何通过使用静态ViewHolder模式优化ListView性能达50%,避免内存溢出问题,并探讨ListView的getView方法工作原理及多轮重复调用的解决方案。
778

被折叠的 条评论
为什么被折叠?



