Lines Matching refs:Loader

19 import android.content.Loader;
31 * one or more {@link android.content.Loader} instances associated with it. This
64 * Instantiate and return a new Loader for the given ID.
68 * @return Return a new Loader instance that is ready to start loading.
70 public Loader<D> onCreateLoader(int id, Bundle args);
80 * the last data that was supplied for this Loader. At this point
82 * soon), but should not do your own release of the data since its Loader
83 * owns it and will take care of that. The Loader will take care of
87 * <li> <p>The Loader will monitor for changes to the data, and report
99 * <li> The Loader will release the data once it knows the application
108 * @param loader The Loader that has finished.
109 * @param data The data generated by the Loader.
111 public void onLoadFinished(Loader<D> loader, D data);
116 * remove any references it has to the Loader's data.
118 * @param loader The Loader that is being reset.
120 public void onLoaderReset(Loader<D> loader);
145 public abstract <D> Loader<D> initLoader(int id, Bundle args,
149 * Starts a new or restarts an existing {@link android.content.Loader} in
163 public abstract <D> Loader<D> restartLoader(int id, Bundle args,
169 * {@link LoaderCallbacks#onLoadFinished(Loader, Object)}, a call
170 * will be made to {@link LoaderCallbacks#onLoaderReset(Loader)}.
175 * Return the Loader with the given id or null if no matching Loader
178 public abstract <D> Loader<D> getLoader(int id);
224 final class LoaderInfo implements Loader.OnLoadCompleteListener<Object>,
225 Loader.OnLoadCanceledListener<Object> {
229 Loader<Object> mLoader;
391 public void onLoadCanceled(Loader<Object> loader) {
420 public void onLoadComplete(Loader<Object> loader, Object data) {
476 void callOnLoadFinished(Loader<Object> loader, Object data) {
529 writer.print(prefix); writer.println("Pending Loader ");
549 Loader<Object> loader = callback.onCreateLoader(id, args);
550 info.mLoader = (Loader<Object>)loader;
577 * Call to initialize a particular ID with a Loader. If this ID already
578 * has a Loader associated with it, it is left unchanged and any previous
580 * a Loader for the ID, a new one is created and started.
583 * to ensure that a Loader it relies on is created. This allows it to re-use
584 * an existing Loader's data if there already is one, so that for example
588 * <p>Note that in the case where an existing Loader is re-used, the
590 * continue using the previous Loader.
593 * which to manage the new Loader.
596 * @param callback Interface implementing management of this Loader. Required.
598 * instantiate the Loader object.
601 public <D> Loader<D> initLoader(int id, Bundle args, LoaderManager.LoaderCallbacks<D> callback) {
611 // Loader doesn't already exist; create.
624 return (Loader<D>)info.mLoader;
628 * Call to re-create the Loader associated with a particular ID. If there
629 * is currently a Loader associated with this ID, it will be
630 * canceled/stopped/destroyed as appropriate. A new Loader with the given
635 * new calls to this function will create and return a new Loader but not
643 * which to manage the new Loader.
646 * @param callback Interface implementing management of this Loader. Required.
648 * instantiate the Loader object.
651 public <D> Loader<D> restartLoader(int id, Bundle args, LoaderManager.LoaderCallbacks<D> callback) {
676 // The current Loader has not been started or was successfully canceled,
696 return (Loader<D>)info.mPendingLoader.mLoader;
709 return (Loader<D>)info.mLoader;
713 * Rip down, tear apart, shred to pieces a current Loader ID. After returning
714 * from this function, any Loader objects associated with this ID are
717 * @param id Identifier of the Loader to be destroyed.
743 * Return the most recent Loader object associated with the
747 public <D> Loader<D> getLoader(int id) {
755 return (Loader<D>)loaderInfo.mPendingLoader.mLoader;
757 return (Loader<D>)loaderInfo.mLoader;