分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
- 首先高度要固定
- listView item的布局中RelativeLayout的高度要是一个固定的值
- 如下
- android:layout_height="?android:attr/listPreferredItemHeight"
其次:加载 layout文件 创建LayoutInflater对象的时候 要使用:
- convertView = mInflater.inflate(R.layout.list_item_kind, parent, false);
- 不能使用
- convertView = mInflater.inflate(R.layout.list_item_kind, null); //error
把这俩问题解决了 就ok了
。 该bug在 android 2.2 以上的版本已经解决
+=======================================
相关链接:
http://www.isomobile.com/read.php?tid-462.html