IT. Expert System.

Android Reference


Class AsyncTaskLoader<D>

  • Direct Known Subclasses:

    public abstract class AsyncTaskLoader<D>
    extends Loader<D>
    Static library support version of the framework's AsyncTaskLoader. 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.
    • Constructor Detail

      • AsyncTaskLoader

        public AsyncTaskLoader(Context context)
    • Method Detail

      • setUpdateThrottle

        public void setUpdateThrottle(long delayMS)
        Set amount to throttle updates by. This is the minimum time from when the last onLoadInBackground() call has completed until a new load is scheduled.
        delayMS - Amount of delay, in milliseconds.
      • onForceLoad

        protected void onForceLoad()
        Description copied from class: Loader
        Subclasses must implement this to take care of requests to Loader.forceLoad(). This will always be called from the process's main thread.
        onForceLoad in class Loader<D>
      • cancelLoad

        public boolean cancelLoad()
        Attempt to cancel the current load task. See AsyncTask.cancel(boolean) for more info. Must be called on the main thread of the process.

        Cancelling is not an immediate operation, since the load is performed in a background thread. If there is currently a load in progress, this method requests that the load be cancelled, and notes this is the case; once the background thread has completed its work its remaining state will be cleared. If another load request comes in during this time, it will be held until the cancelled load is complete.

        Returns false if the task could not be cancelled, typically because it has already completed normally, or because Loader.startLoading() hasn't been called; returns true otherwise.
      • onCanceled

        public void onCanceled(D data)
        Called if the task was canceled before it was completed. Gives the class a chance to properly dispose of the result.
      • loadInBackground

        public abstract D loadInBackground()
      • onLoadInBackground

        protected D onLoadInBackground()
        Called on a worker thread to perform the actual load. Implementations should not deliver the result directly, but should return them from this method, which will eventually end up calling Loader.deliverResult(D) on the UI thread. If implementations need to process the results on the UI thread they may override Loader.deliverResult(D) and do so there.
        Implementations must return the result of their load operation.
      • waitForLoader

        public void waitForLoader()
        Locks the current thread until the loader completes the current load operation. Returns immediately if there is no load operation running. Should not be called from the UI thread: calling it from the UI thread would cause a deadlock.

        Use for testing only. Never call this from a UI thread.

      • dump

        public void dump(String prefix,
                FileDescriptor fd,
                PrintWriter writer,
                String[] args)
        Description copied from class: Loader
        Print the Loader's state into the given stream.
        dump in class Loader<D>
        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.


Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)





Java Script








Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 137 / 158851750. Delta: 1.11161 с