ListView中convertView只有第一次爲null的原因

  1. <ListView    
  2.         android:id="@+id/result"    
  3.         android:layout_width="fill_parent"    
  4.         android:layout_height="fill_parent"/>
此處請注意,ListView的android:layout_height屬性值爲"fill_paternt",如果爲“wrap_content"將會是另一種情況。其適配器的getView方法裏只有第一個Item的convertview爲null其他的不爲空。
發佈了41 篇原創文章 · 獲贊 0 · 訪問量 3萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章