listView 中relativeLayout 佈局的 android layout alignParentBotto
阿新 • • 發佈:2018-11-09
分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow
也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!
[xhtml] view plain copy print ?- 首先高度要固定
- 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
把這倆問題解決了 就ok了
。 該bug在 android 2.2 以上的版本已經解決
+=======================================
相關連結:
http://www.isomobile.com/read.php?tid-462.html
http://code.google.com/p/android/issues/detail?id=1394