SimpleCursorAdapter Constructors

Definition

Overloads

SimpleCursorAdapter(IntPtr, JniHandleOwnership)

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

SimpleCursorAdapter(Context, Int32, ICursor, String[], Int32[])
Obsolete.

Constructor the enables auto-requery.

SimpleCursorAdapter(Context, Int32, ICursor, String[], Int32[], CursorAdapterFlags)

Standard constructor.

SimpleCursorAdapter(IntPtr, JniHandleOwnership)

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

protected SimpleCursorAdapter (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Widget.SimpleCursorAdapter : nativeint * Android.Runtime.JniHandleOwnership -> Android.Widget.SimpleCursorAdapter

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

SimpleCursorAdapter(Context, Int32, ICursor, String[], Int32[])

Caution

deprecated

Constructor the enables auto-requery.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;ILandroid/database/Cursor;[Ljava/lang/String;[I)V", "")]
[System.Obsolete("deprecated")]
public SimpleCursorAdapter (Android.Content.Context? context, int layout, Android.Database.ICursor? c, string[]? from, int[]? to);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;ILandroid/database/Cursor;[Ljava/lang/String;[I)V", "")>]
[<System.Obsolete("deprecated")>]
new Android.Widget.SimpleCursorAdapter : Android.Content.Context * int * Android.Database.ICursor * string[] * int[] -> Android.Widget.SimpleCursorAdapter

Parameters

context
Context
layout
Int32
from
String[]
to
Int32[]
Attributes

Remarks

Constructor the enables auto-requery.

This member is deprecated. This option is discouraged, as it results in Cursor queries being performed on the application's UI thread and thus can cause poor responsiveness or even Application Not Responding errors. As an alternative, use android.app.LoaderManager with a android.content.CursorLoader.

Java documentation for android.widget.SimpleCursorAdapter.SimpleCursorAdapter(android.content.Context, int, android.database.Cursor, java.lang.String[], int[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

SimpleCursorAdapter(Context, Int32, ICursor, String[], Int32[], CursorAdapterFlags)

Standard constructor.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;ILandroid/database/Cursor;[Ljava/lang/String;[II)V", "")]
public SimpleCursorAdapter (Android.Content.Context? context, int layout, Android.Database.ICursor? c, string[]? from, int[]? to, Android.Widget.CursorAdapterFlags flags);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;ILandroid/database/Cursor;[Ljava/lang/String;[II)V", "")>]
new Android.Widget.SimpleCursorAdapter : Android.Content.Context * int * Android.Database.ICursor * string[] * int[] * Android.Widget.CursorAdapterFlags -> Android.Widget.SimpleCursorAdapter

Parameters

context
Context

The context where the ListView associated with this SimpleListItemFactory is running

layout
Int32

resource identifier of a layout file that defines the views for this list item. The layout file should include at least those named views defined in "to"

c
ICursor

The database cursor. Can be null if the cursor is not available yet.

from
String[]

A list of column names representing the data to bind to the UI. Can be null if the cursor is not available yet.

to
Int32[]

The views that should display column in the "from" parameter. These should all be TextViews. The first N views in this list are given the values of the first N columns in the from parameter. Can be null if the cursor is not available yet.

flags
CursorAdapterFlags

Flags used to determine the behavior of the adapter, as per CursorAdapter#CursorAdapter(Context, Cursor, int).

Attributes

Remarks

Standard constructor.

Java documentation for android.widget.SimpleCursorAdapter.SimpleCursorAdapter(android.content.Context, int, android.database.Cursor, java.lang.String[], int[], int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to