Android Guides | Samples

Android.Widget.CursorAdapter Class

Adapter that exposes data from a ICursor to a ListView widget.

See Also: CursorAdapter

Syntax

[Android.Runtime.Register("android/widget/CursorAdapter", DoNotGenerateAcw=true)]
public abstract class CursorAdapter : BaseAdapter, IFilterable, IDisposable

Remarks

Adapter that exposes data from a ICursor to a ListView widget.

The Cursor must include a column named "_id" or this class will not work. Additionally, using MergeCursor with this class will not work if the merged Cursors have overlapping values in their "_id" columns.

[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.CursorAdapter are listed below.

See Also: BaseAdapter

Public Constructors

Constructor that always enables auto-requery.
Recommended constructor.
Constructor that allows control over auto-requery.

Protected Constructors

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

Public Properties

[read-only]
override
CountInt32. How many items are in the data set represented by this Adapter.
[read-only]
CursorICursor. Returns the cursor.
[read-only]
FilterFilter.
FilterQueryProviderIFilterQueryProvider. Returns the query filter provider used for filtering.

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

abstract
BindView(View, Context, ICursor)
Bind an existing view to the data pointed to by cursor
ChangeCursor(ICursor)
Change the underlying cursor to a new cursor.
ConvertToString(ICursor) : String
ConvertToStringFormatted(ICursor) : ICharSequence
override
GetItem(Int32) : Object
Get the data item associated with the specified position in the data set.
override
GetItemId(Int32) : Int64
Get the row id associated with the specified position in the list.
override
GetView(Int32, View, ViewGroup) : View
Get a View that displays the data at the specified position in the data set.
NewDropDownView(Context, ICursor, ViewGroup) : View
Makes a new drop down view to hold the data pointed to by cursor.
abstract
NewView(Context, ICursor, ViewGroup) : View
Makes a new view to hold the data pointed to by cursor.
RunQueryOnBackgroundThread(ICharSequence) : ICursor
Runs a query with the specified constraint.
RunQueryOnBackgroundThread(String) : ICursor
SwapCursor(ICursor) : ICursor
Swap in a new Cursor, returning the old Cursor.

Protected Methods

Init(Context, ICursor, Boolean)
OnContentChanged()
Called when the ContentObserver on the cursor receives a change notification.