Android Guides | Samples

Android.Widget.ListView Class

A view that shows items in a vertically scrolling list.

See Also: ListView

Syntax

[Android.Runtime.Register("android/widget/ListView", DoNotGenerateAcw=true)]
public class ListView : AbsListView

Remarks

A view that shows items in a vertically scrolling list. The items come from the IListAdapter associated with this view.

See the List View guide.

[Android Documentation]

Requirements

Namespace: Android.Widget
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Widget.ListView are listed below.

See Also: AbsListView

Public Constructors

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Fields

Public Properties

override
AdapterIListAdapter. Returns the adapter currently in use in this ListView.
[read-only]
override
CheckedItemPositionInt32.
[read-only]
override
CheckedItemPositionsSparseBooleanArray.
override
ChoiceModeChoiceMode.
DividerDrawable. Returns the drawable that will be drawn between each item in the list.
DividerHeightInt32.
[read-only]
FooterViewsCountInt32. Returns the number of footer views in the list.
[read-only]
HeaderViewsCountInt32. Returns the number of header views in the list.
ItemsCanFocusBoolean.
[read-only]
MaxScrollAmountInt32.
OverscrollFooterDrawable.
OverscrollHeaderDrawable.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

AddFooterView(View)
Add a fixed view to appear at the bottom of the list.
AddFooterView(View, Object, Boolean)
Add a fixed view to appear at the bottom of the list.
AddHeaderView(View)
Add a fixed view to appear at the top of the list.
AddHeaderView(View, Object, Boolean)
Add a fixed view to appear at the top of the list.
AreFooterDividersEnabled() : Boolean
AreHeaderDividersEnabled() : Boolean
override
ClearChoices()
override
GetCheckedItemIds() : Int64[]
GetCheckItemIds() : Int64[]
Returns the set of checked items ids.
override
IsItemChecked(Int32) : Boolean
RemoveFooterView(View) : Boolean
Removes a previously-added footer view.
RemoveHeaderView(View) : Boolean
Removes a previously-added header view.
SetFooterDividersEnabled(Boolean)
Enables or disables the drawing of the divider for footer views.
SetHeaderDividersEnabled(Boolean)
Enables or disables the drawing of the divider for header views.
override
SetItemChecked(Int32, Boolean)
override
SetSelection(Int32)
Sets the currently selected item.
SetSelectionAfterHeaderView()
setSelectionAfterHeaderView set the selection to be the first list item after the header views.
override
SetSelectionFromTop(Int32, Int32)
Sets the selected item and positions the selection y pixels from the top edge of the ListView.
SmoothScrollByOffset(Int32)
Smoothly scroll to the specified adapter position offset.

Protected Methods