Home | History | Annotate | Download | only in components

Lines Matching full:loader

9     <li><a href="#summary">Loader API Summary</a></li>
13 <li><a href="#starting">Starting a Loader</a></li>
14 <li><a href="#restarting">Restarting a Loader</a></li>
28 <li>{@link android.content.Loader}</li>
52 <li>They automatically reconnect to the last loader's cursor when being
57 <h2 id="summary">Loader API Summary</h2>
71 android.content.Loader} instances. This helps an application manage
86 callback method to create a new loader.</td>
89 <td>{@link android.content.Loader}</td>
91 the base class for a loader. You would typically use {@link
98 <td>Abstract loader that provides an {@link android.os.AsyncTask} to do the work.</td>
105 android.content.Loader} protocol in a standard way for querying cursors,
108 this loader is the best way to asynchronously load data from a {@link
115 you'll use to implement a loader in your application. You won't need all of them
116 for each loader you create, but you'll always need a reference to the {@link
117 android.app.LoaderManager} in order to initialize a loader and an implementation
118 of a {@link android.content.Loader} class such as {@link
130 of {@link android.content.Loader} or {@link android.content.AsyncTaskLoader} to
135 <li>A way of displaying the loader's data, such as a {@link
140 <h3 id="starting">Starting a Loader</h3>
143 android.content.Loader} instances within an {@link android.app.Activity} or
148 initialize a {@link android.content.Loader} within the activity's {@link
153 <pre>// Prepare the loader. Either re-connect with an existing one,
160 <li>A unique ID that identifies the loader. In this example, the ID is 0.</li>
161 <li>Optional arguments to supply to the loader at
165 the {@link android.app.LoaderManager} calls to report loader events. In this
170 <p>The {@link android.app.LoaderManager#initLoader initLoader()} call ensures that a loader
173 <li>If the loader specified by the ID already exists, the last created loader
175 <li>If the loader specified by the ID does <em>not</em> exist,
178 This is where you implement the code to instantiate and return a new loader.
183 implementation is associated with the loader, and will be called when the
184 loader state changes. If at the point of this call the caller is in its
185 started state, and the requested loader already exists and has generated its
193 method returns the {@link android.content.Loader} that is created, but you don't
195 the life of the loader automatically. The {@link android.app.LoaderManager}
196 starts and stops loading when necessary, and maintains the state of the loader
198 directly (though for an example of using loader methods to fine-tune a loader's
205 <h3 id="restarting">Restarting a Loader</h3>
208 shown above, it uses an existing loader with the specified ID if there is one.
215 the loader when the user's query changes. The loader needs to be restarted so
221 // the search filter, and restart the loader to do a new query
238 when to know when to create a new loader, and to tell the application when it is
239 time to stop using a loader's data.</p>
245 Instantiate and return a new {@link android.content.Loader} for the given ID.
249 &#8212; Called when a previously created loader has finished its load.
253 &#8212; Called when a previously created loader is being reset, thus making its
261 <p>When you attempt to access a loader (for example, through {@link
263 the loader specified by the ID exists. If it doesn't, it triggers the {@link
266 is where you create a new loader. Typically this will be a {@link
268 android.content.Loader} subclass. </p>
295 public Loader&lt;Cursor&gt; onCreateLoader(int id, Bundle args) {
296 // This is called when a new Loader needs to be created.  This
297 // sample only has one Loader, so we don't care about the ID.
319 <p>This method is called when a previously created loader has finished its load.
321 that was supplied for this loader. At this point you should remove all use of
323 release of the data since its loader owns it and will take care of that.</p>
326 <p>The loader will release the data once it knows the application is no longer
339 public void onLoadFinished(Loader&lt;Cursor&gt; loader, Cursor data) {
347 loader is being reset, thus
359 public void onLoaderReset(Loader&lt;Cursor&gt; loader) {
405         // Prepare the loader.  Either re-connect with an existing one,
422         // the search filter, and restart the loader to do a new query
448     public Loader&lt;Cursor&gt; onCreateLoader(int id, Bundle args) {
449         // This is called when a new Loader needs to be created.  This
450         // sample only has one Loader, so we don't care about the ID.
471     public void onLoadFinished(Loader&lt;Cursor&gt; loader, Cursor data) {
477     public void onLoaderReset(Loader&lt;Cursor&gt; loader) {