CursorLoader

open class CursorLoader : AsyncTaskLoader<Cursor!>
kotlin.Any
   ↳ androidx.loader.content.Loader<D>
   ↳ androidx.loader.content.AsyncTaskLoader<android.database.Cursor>
   ↳ androidx.loader.content.CursorLoader

Static library support version of the framework's android.content.CursorLoader. Used to write apps that run on platforms prior to Android 3.0. When running on Android 3.0 or above, this implementation is still used; it does not try to switch to the framework's implementation. See the framework SDK documentation for a class overview.

Summary

Public constructors
<init>(context: Context)

Creates an empty unspecified CursorLoader.

<init>(context: Context, uri: Uri, projection: Array<String!>?, selection: String?, selectionArgs: Array<String!>?, sortOrder: String?)

Creates a fully-specified CursorLoader.

Public methods
open Array<String!>?

open Uri

open Unit
setProjection(projection: Array<String!>?)

open Array<String!>?

open Unit
dump(prefix: String!, fd: FileDescriptor!, writer: PrintWriter!, args: Array<String!>!)

open Unit
setSelectionArgs(selectionArgs: Array<String!>?)

open Unit
setUri(uri: Uri)

open Unit

open Unit
setSelection(selection: String?)

open Cursor?

open Unit
setSortOrder(sortOrder: String?)

open String?

open Unit

open Unit
onCanceled(cursor: Cursor?)

open String?

Protected methods
open Unit

Starts an asynchronous load of the contacts list data.

open Unit

open Unit

Must be called from the UI thread

Inherited functions

Public constructors

<init>

CursorLoader(context: Context)

Creates an empty unspecified CursorLoader. You must follow this with calls to #setUri(Uri), #setSelection(String), etc to specify the query to perform.

<init>

CursorLoader(context: Context, uri: Uri, projection: Array<String!>?, selection: String?, selectionArgs: Array<String!>?, sortOrder: String?)

Creates a fully-specified CursorLoader. See ContentResolver#query(Uri, String[], String, String[], String) for documentation on the meaning of the parameters. These will be passed as-is to that call.

Public methods

getProjection

open fun getProjection(): Array<String!>?

getUri

open fun getUri(): Uri

setProjection

open fun setProjection(projection: Array<String!>?): Unit

getSelectionArgs

open fun getSelectionArgs(): Array<String!>?

dump

open fun 
        dump
(prefix: String!, fd: FileDescriptor!, writer: PrintWriter!, args: Array<String!>!): Unit

Deprecated:

setSelectionArgs

open fun setSelectionArgs(selectionArgs: Array<String!>?): Unit

setUri

open fun setUri(uri: Uri): Unit

deliverResult

open fun deliverResult(cursor: Cursor?): Unit

setSelection

open fun setSelection(selection: String?): Unit

loadInBackground

open fun loadInBackground(): Cursor?

setSortOrder

open fun setSortOrder(sortOrder: String?): Unit

getSortOrder

open fun getSortOrder(): String?

cancelLoadInBackground

open fun cancelLoadInBackground(): Unit

onCanceled

open fun onCanceled(cursor: Cursor?): Unit

getSelection

open fun getSelection(): String?

Protected methods

onStartLoading

protected open fun onStartLoading(): Unit

Starts an asynchronous load of the contacts list data. When the result is ready the callbacks will be called on the UI thread. If a previous load has been completed and is still valid the result may be passed to the callbacks immediately. Must be called from the UI thread

onReset

protected open fun onReset(): Unit

onStopLoading

protected open fun onStopLoading(): Unit

Must be called from the UI thread