Share via


ResourceCursorAdapter Constructors

Definition

Overloads

ResourceCursorAdapter(IntPtr, JniHandleOwnership)

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

ResourceCursorAdapter(Context, Int32, ICursor)
Obsolete.

Constructor the enables auto-requery.

ResourceCursorAdapter(Context, Int32, ICursor, CursorAdapterFlags)

Standard constructor.

ResourceCursorAdapter(Context, Int32, ICursor, Boolean)

Constructor with default behavior as per CursorAdapter#CursorAdapter(Context, Cursor, boolean); it is recommended you not use this, but instead #ResourceCursorAdapter(Context, int, Cursor, int).

ResourceCursorAdapter(IntPtr, JniHandleOwnership)

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

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

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

ResourceCursorAdapter(Context, Int32, ICursor)

Caution

deprecated

Constructor the enables auto-requery.

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

Parameters

context
Context

The context where the ListView associated with this adapter is running

layout
Int32

resource identifier of a layout file that defines the views for this list item. Unless you override them later, this will define both the item views and the drop down views.

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.ResourceCursorAdapter.ResourceCursorAdapter(android.content.Context, int, android.database.Cursor).

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

ResourceCursorAdapter(Context, Int32, ICursor, CursorAdapterFlags)

Standard constructor.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;ILandroid/database/Cursor;I)V", "")]
public ResourceCursorAdapter (Android.Content.Context? context, int layout, Android.Database.ICursor? c, Android.Widget.CursorAdapterFlags flags);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;ILandroid/database/Cursor;I)V", "")>]
new Android.Widget.ResourceCursorAdapter : Android.Content.Context * int * Android.Database.ICursor * Android.Widget.CursorAdapterFlags -> Android.Widget.ResourceCursorAdapter

Parameters

context
Context

The context where the ListView associated with this adapter is running

layout
Int32

Resource identifier of a layout file that defines the views for this list item. Unless you override them later, this will define both the item views and the drop down views.

c
ICursor

The cursor from which to get the data.

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.ResourceCursorAdapter.ResourceCursorAdapter(android.content.Context, int, android.database.Cursor, 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

ResourceCursorAdapter(Context, Int32, ICursor, Boolean)

Constructor with default behavior as per CursorAdapter#CursorAdapter(Context, Cursor, boolean); it is recommended you not use this, but instead #ResourceCursorAdapter(Context, int, Cursor, int).

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;ILandroid/database/Cursor;Z)V", "")]
public ResourceCursorAdapter (Android.Content.Context? context, int layout, Android.Database.ICursor? c, bool autoRequery);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;ILandroid/database/Cursor;Z)V", "")>]
new Android.Widget.ResourceCursorAdapter : Android.Content.Context * int * Android.Database.ICursor * bool -> Android.Widget.ResourceCursorAdapter

Parameters

context
Context

The context where the ListView associated with this adapter is running

layout
Int32

resource identifier of a layout file that defines the views for this list item. Unless you override them later, this will define both the item views and the drop down views.

c
ICursor

The cursor from which to get the data.

autoRequery
Boolean

If true the adapter will call requery() on the cursor whenever it changes so the most recent data is always displayed. Using true here is discouraged.

Attributes

Remarks

Constructor with default behavior as per CursorAdapter#CursorAdapter(Context, Cursor, boolean); it is recommended you not use this, but instead #ResourceCursorAdapter(Context, int, Cursor, int). When using this constructor, #FLAG_REGISTER_CONTENT_OBSERVER will always be set.

Java documentation for android.widget.ResourceCursorAdapter.ResourceCursorAdapter(android.content.Context, int, android.database.Cursor, boolean).

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