http://developer.android.com/reference/android/widget/ListView.html

属性

android:divider

  • Drawable or color to draw between list items.

android:dividerHeight

  • Height of the divider.

android:entries

  • Reference to an array resource that will populate the ListView.

android:footerDividersEnabled

  • When set to false, the ListView will not draw the divider before each footer view.

android:headerDividersEnabled

  • When set to false, the ListView will not draw the divider after each header view.

android:cacheColorHint

  • Indicates that this list will always be drawn on top of solid, single-color opaque background.

android:listSelector

  • Drawable used to indicate the currently selected item in the list.

android:scrollingCache

  • When set to true, the list uses a drawing cache during scrolling.

方法

addFooterView(View v)

  • Add a fixed view to appear at the bottom of the list.

addHeaderView(View v)

  • Add a fixed view to appear at the top of the list.

getAdapter()

  • Returns the adapter currently in use in this ListView.

getDivider()

  • Returns the drawable that will be drawn between each item in the list.

getFooterViewsCount()

  • Returns the number of footer views in the list.

getHeaderViewsCount()

  • Returns the number of header views in the list.