|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.support.v4.content.Loader<D>
android.support.v4.content.AsyncTaskLoader<android.database.Cursor>
android.support.v4.content.CursorLoader
public class CursorLoader

Static library support version of the framework's 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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class android.support.v4.content.Loader |
|---|
Loader.ForceLoadContentObserver, Loader.OnLoadCompleteListener<D> |
| Constructor Summary | |
|---|---|
CursorLoader(android.content.Context context)
Creates an empty unspecified CursorLoader. |
|
CursorLoader(android.content.Context context,
android.net.Uri uri,
String[] projection,
String selection,
String[] selectionArgs,
String sortOrder)
Creates a fully-specified CursorLoader. |
|
| Method Summary | |
|---|---|
void |
deliverResult(android.database.Cursor cursor)
Sends the result of the load to the registered listener. |
void |
dump(String prefix,
FileDescriptor fd,
PrintWriter writer,
String[] args)
Print the Loader's state into the given stream. |
String[] |
getProjection()
|
String |
getSelection()
|
String[] |
getSelectionArgs()
|
String |
getSortOrder()
|
android.net.Uri |
getUri()
|
android.database.Cursor |
loadInBackground()
|
void |
onCanceled(android.database.Cursor cursor)
Called if the task was canceled before it was completed. |
protected void |
onReset()
Subclasses must implement this to take care of resetting their loader, as per Loader.reset(). |
protected void |
onStartLoading()
Starts an asynchronous load of the contacts list data. |
protected void |
onStopLoading()
Must be called from the UI thread |
void |
setProjection(String[] projection)
|
void |
setSelection(String selection)
|
void |
setSelectionArgs(String[] selectionArgs)
|
void |
setSortOrder(String sortOrder)
|
void |
setUri(android.net.Uri uri)
|
| Methods inherited from class android.support.v4.content.AsyncTaskLoader |
|---|
cancelLoad, onForceLoad, onLoadInBackground, setUpdateThrottle, waitForLoader |
| Methods inherited from class android.support.v4.content.Loader |
|---|
abandon, dataToString, forceLoad, getContext, getId, isAbandoned, isReset, isStarted, onAbandon, onContentChanged, registerListener, reset, startLoading, stopLoading, takeContentChanged, toString, unregisterListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CursorLoader(android.content.Context context)
setUri(Uri), setSelection(String), etc
to specify the query to perform.
public CursorLoader(android.content.Context context,
android.net.Uri uri,
String[] projection,
String selection,
String[] selectionArgs,
String sortOrder)
ContentResolver.query() for documentation on the meaning of the
parameters. These will be passed as-is to that call.
| Method Detail |
|---|
public android.database.Cursor loadInBackground()
loadInBackground in class AsyncTaskLoader<android.database.Cursor>public void deliverResult(android.database.Cursor cursor)
Loader
deliverResult in class Loader<android.database.Cursor>cursor - the result of the loadprotected void onStartLoading()
onStartLoading in class Loader<android.database.Cursor>protected void onStopLoading()
onStopLoading in class Loader<android.database.Cursor>public void onCanceled(android.database.Cursor cursor)
AsyncTaskLoader
onCanceled in class AsyncTaskLoader<android.database.Cursor>protected void onReset()
LoaderLoader.reset(). This is not called by clients directly,
but as a result of a call to Loader.reset().
This will always be called from the process's main thread.
onReset in class Loader<android.database.Cursor>public android.net.Uri getUri()
public void setUri(android.net.Uri uri)
public String[] getProjection()
public void setProjection(String[] projection)
public String getSelection()
public void setSelection(String selection)
public String[] getSelectionArgs()
public void setSelectionArgs(String[] selectionArgs)
public String getSortOrder()
public void setSortOrder(String sortOrder)
public void dump(String prefix,
FileDescriptor fd,
PrintWriter writer,
String[] args)
Loader
dump in class AsyncTaskLoader<android.database.Cursor>prefix - Text to print at the front of each line.fd - The raw file descriptor that the dump is being sent to.writer - A PrintWriter to which the dump is to be set.args - Additional arguments to the dump request.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||