Android Guides | Samples

Android.Content.CursorLoader Class

A loader that queries the ContentResolver and returns a ICursor.

See Also: CursorLoader

Syntax

[Android.Runtime.Register("android/content/CursorLoader", DoNotGenerateAcw=true)]
public class CursorLoader : AsyncTaskLoader

Remarks

A loader that queries the ContentResolver and returns a ICursor. This class implements the Loader protocol in a standard way for querying cursors, building on AsyncTaskLoader to perform the cursor query on a background thread so that it does not block the application's UI.

A CursorLoader must be built with the full information for the query to perform, either through the CursorLoader.CursorLoader(Context,Uri,Uri,Uri,Uri,Uri) or creating an empty instance with CursorLoader.CursorLoader(Context) and filling in the desired paramters with CursorLoader.Uri, CursorLoader.Selection, CursorLoader.SetSelectionArgs(String[]), CursorLoader.SortOrder, and CursorLoader.SetProjection(String[]).

[Android Documentation]

Requirements

Namespace: Android.Content
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 11

The members of Android.Content.CursorLoader are listed below.

See Also: AsyncTaskLoader

Public Constructors

Creates an empty unspecified CursorLoader.
Creates a fully-specified CursorLoader.

Protected Constructors

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

Public Properties

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

DeliverResult(ICursor)
Sends the result of the load to the registered listener.
GetProjection() : String[]
GetSelectionArgs() : String[]
override
LoadInBackground() : Object
Called on a worker thread to perform the actual load and to return the result of the load operation.
OnCanceled(ICursor)
Called if the task was canceled before it was completed.
SetProjection(String[])
SetSelectionArgs(String[])