Android.Widget.SimpleCursorAdapter Class
An easy adapter to map columns from a cursor to TextViews or ImageViews defined in an XML file.

See Also: SimpleCursorAdapter Members

Syntax

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

Remarks

An easy adapter to map columns from a cursor to TextViews or ImageViews defined in an XML file. You can specify which columns you want, which views you want to display the columns, and the XML file that defines the appearance of these views. Binding occurs in two phases. First, if a NoType:android/widget/SimpleCursorAdapter$ViewBinder;Href=../../../reference/android/widget/SimpleCursorAdapter.ViewBinder.html is available, NoType:android/widget/SimpleCursorAdapter$ViewBinder;Href=../../../reference/android/widget/SimpleCursorAdapter.ViewBinder.html#setViewValue(android.view.View, android.database.Cursor, int) is invoked. If the returned value is true, binding has occured. If the returned value is false and the view to bind is a TextView, SimpleCursorAdapter.SetViewText(TextView, System.String) is invoked. If the returned value is false and the view to bind is an ImageView, SimpleCursorAdapter.SetViewImage(ImageView, System.String) is invoked. If no appropriate binding can be found, an Java.Lang.IllegalStateException is thrown. If this adapter is used with filtering, for instance in an Android.Widget.AutoCompleteTextView, you can use the NoType:android/widget/SimpleCursorAdapter$CursorToStringConverter;Href=../../../reference/android/widget/SimpleCursorAdapter.CursorToStringConverter.html and the Android.Widget.IFilterQueryProvider interfaces to get control over the filtering process. You can refer to SimpleCursorAdapter.convertToString(android.database.Cursor) and CursorAdapter.RunQueryOnBackgroundThread(Java.Lang.ICharSequence) for more information.

[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