2012年9月19日 星期三

android listview 優化

除了Adapter的getView要reuse cell之外
關鍵是要設定list view layout android:layout_height="0dp"

ex:


                     <ListView
android:id="@+id/friendListListView"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:fadingEdge="none"
android:footerDividersEnabled="false"
android:scrollingCache="false"
android:cacheColorHint="#00000000"
android:divider="@null"/>

沒有留言:

張貼留言