Android Guides | Samples

Android.Widget.AdapterView Class

An AdapterView is a view whose children are determined by an Adapter.

See Also: AdapterView

Syntax

[Android.Runtime.Register("android/widget/AdapterView", DoNotGenerateAcw=true)]
public abstract class AdapterView : ViewGroup

Remarks

An AdapterView is a view whose children are determined by an Adapter.

See ListView, GridView, Spinner and Gallery for commonly used subclasses of AdapterView.

Developer Guides

For more information about using AdapterView, read the Binding to Data with AdapterView developer 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.AdapterView are listed below.

See Also: ViewGroup

Public Constructors

Protected Constructors

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

Public Fields

const
InvalidPositionInt32 (-1). Represents an invalid position.
const
InvalidRowIdInt64 (-9223372036854775808). Represents an empty or invalid row id
const
ItemViewTypeHeaderOrFooterInt32 (-2). The item view type returned by Adapter.getItemViewType(int) when the item is a header or footer.
const
ItemViewTypeIgnoreInt32 (-1). The item view type returned by Adapter.getItemViewType(int) when the adapter does not want the item's view recycled.

Public Properties

[read-only]
CountInt32.
EmptyViewView. When the current adapter is empty, the AdapterView can display a special view called the empty view.
[read-only]
FirstVisiblePositionInt32. Returns the position within the adapter's data set for the first item displayed on screen.
[read-only]
LastVisiblePositionInt32. Returns the position within the adapter's data set for the last item displayed on screen.
OnItemClickListenerAdapterView+IOnItemClickListener.
OnItemLongClickListenerAdapterView+IOnItemLongClickListener.
OnItemSelectedListenerAdapterView+IOnItemSelectedListener.
[read-only]
SelectedItemObject.
[read-only]
SelectedItemIdInt64.
[read-only]
SelectedItemPositionInt32. Return the position of the currently selected item within the adapter's data set
[read-only]
abstract
SelectedViewView.

Protected Properties

abstract
RawAdapterObject. Returns the adapter currently associated with this widget.
[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

GetItemAtPosition(Int32) : Object
Gets the data associated with the specified position in the list.
GetItemIdAtPosition(Int32) : Int64
GetPositionForView(View) : Int32
Get the position within the adapter's data set for the view, where view is a an adapter item or a descendant of an adapter item.
PerformItemClick(View, Int32, Int64) : Boolean
Call the OnItemClickListener, if it is defined.
abstract
SetSelection(Int32)
Sets the currently selected item.

Protected Methods

override
OnLayout(Boolean, Int32, Int32, Int32, Int32)
Called from layout when this view should assign a size and position to each of its children.

Public Events