Tabnine Logo
com.nostra13.universalimageloader.core
Code IndexAdd Tabnine to your IDE (free)

How to use com.nostra13.universalimageloader.core

Best Java code snippets using com.nostra13.universalimageloader.core (Showing top 20 results out of 801)

origin: nostra13/Android-Universal-Image-Loader

/** Builds configured {@link ImageLoaderConfiguration} object */
public ImageLoaderConfiguration build() {
  initEmptyFieldsWithDefaultValues();
  return new ImageLoaderConfiguration(this);
}
origin: nostra13/Android-Universal-Image-Loader

/** @throws TaskCancelledException if current task was interrupted */
private void checkTaskInterrupted() throws TaskCancelledException {
  if (isTaskInterrupted()) {
    throw new TaskCancelledException();
  }
}
origin: nostra13/Android-Universal-Image-Loader

/** @throws TaskCancelledException if target ImageAware is collected by GC */
private void checkViewReused() throws TaskCancelledException {
  if (isViewReused()) {
    throw new TaskCancelledException();
  }
}
origin: nostra13/Android-Universal-Image-Loader

private ImageDownloader getDownloader() {
  ImageDownloader d;
  if (engine.isNetworkDenied()) {
    d = networkDeniedDownloader;
  } else if (engine.isSlowNetwork()) {
    d = slowNetworkDownloader;
  } else {
    d = downloader;
  }
  return d;
}
origin: nostra13/Android-Universal-Image-Loader

/** @throws TaskCancelledException if target ImageAware is collected */
private void checkViewCollected() throws TaskCancelledException {
  if (isViewCollected()) {
    throw new TaskCancelledException();
  }
}
origin: nostra13/Android-Universal-Image-Loader

/**
 * @return <b>true</b> - if task is not actual (target ImageAware is collected by GC or the image URI of this task
 * doesn't match to image URI which is actual for current ImageAware at this moment)); <b>false</b> - otherwise
 */
private boolean isTaskNotActual() {
  return isViewCollected() || isViewReused();
}
origin: nostra13/Android-Universal-Image-Loader

private void fireCancelEvent() {
  if (syncLoading || isTaskInterrupted()) return;
  Runnable r = new Runnable() {
    @Override
    public void run() {
      listener.onLoadingCancelled(uri, imageAware.getWrappedView());
    }
  };
  runTask(r, false, handler, engine);
}
origin: nostra13/Android-Universal-Image-Loader

/**
 * @throws TaskCancelledException if task is not actual (target ImageAware is collected by GC or the image URI of
 *                                this task doesn't match to image URI which is actual for current ImageAware at
 *                                this moment)
 */
private void checkTaskNotActual() throws TaskCancelledException {
  checkViewCollected();
  checkViewReused();
}
origin: nostra13/Android-Universal-Image-Loader

/**
 * @param cacheDir        Directory for file caching
 * @param reserveCacheDir null-ok; Reserve directory for file caching. It's used when the primary directory isn't available.
 */
public BaseDiskCache(File cacheDir, File reserveCacheDir) {
  this(cacheDir, reserveCacheDir, DefaultConfigurationFactory.createFileNameGenerator());
}
origin: nostra13/Android-Universal-Image-Loader

/**
 * Cancel the task of loading and displaying image for passed
 * {@link com.nostra13.universalimageloader.core.imageaware.ImageAware ImageAware}.
 *
 * @param imageAware {@link com.nostra13.universalimageloader.core.imageaware.ImageAware ImageAware} for
 *                   which display task will be cancelled
 */
public void cancelDisplayTask(ImageAware imageAware) {
  engine.cancelDisplayTaskFor(imageAware);
}
origin: nostra13/Android-Universal-Image-Loader

public DisplayBitmapTask(Bitmap bitmap, ImageLoadingInfo imageLoadingInfo, ImageLoaderEngine engine,
    LoadedFrom loadedFrom) {
  this.bitmap = bitmap;
  imageUri = imageLoadingInfo.uri;
  imageAware = imageLoadingInfo.imageAware;
  memoryCacheKey = imageLoadingInfo.memoryCacheKey;
  displayer = imageLoadingInfo.options.getDisplayer();
  listener = imageLoadingInfo.listener;
  this.engine = engine;
  this.loadedFrom = loadedFrom;
}
origin: nostra13/Android-Universal-Image-Loader

/**
 * Returns memory cache
 *
 * @throws IllegalStateException if {@link #init(ImageLoaderConfiguration)} method wasn't called before
 */
public MemoryCache getMemoryCache() {
  checkConfiguration();
  return configuration.memoryCache;
}
origin: nostra13/Android-Universal-Image-Loader

/**
 * Pause ImageLoader. All new "load&display" tasks won't be executed until ImageLoader is {@link #resume() resumed}.
 * <br />
 * Already running tasks are not paused.
 */
public void pause() {
  engine.pause();
}
origin: nostra13/Android-Universal-Image-Loader

private Executor createTaskExecutor() {
  return DefaultConfigurationFactory
      .createExecutor(configuration.threadPoolSize, configuration.threadPriority,
      configuration.tasksProcessingType);
}
origin: nostra13/Android-Universal-Image-Loader

/** Returns singleton class instance */
public static ImageLoader getInstance() {
  if (instance == null) {
    synchronized (ImageLoader.class) {
      if (instance == null) {
        instance = new ImageLoader();
      }
    }
  }
  return instance;
}
origin: nostra13/Android-Universal-Image-Loader

/**
 * Returns URI of image which is loading at this moment into passed
 * {@link com.nostra13.universalimageloader.core.imageaware.ImageAware ImageAware}
 */
public String getLoadingUriForView(ImageAware imageAware) {
  return engine.getLoadingUriForView(imageAware);
}
origin: nostra13/Android-Universal-Image-Loader

/**
 * Sets option whether ImageLoader will use {@link FlushedInputStream} for network downloads to handle <a
 * href="http://code.google.com/p/android/issues/detail?id=6066">this known problem</a> or not.
 *
 * @param handleSlowNetwork pass <b>true</b> - to use {@link FlushedInputStream} for network downloads; <b>false</b>
 *                          - otherwise.
 */
public void handleSlowNetwork(boolean handleSlowNetwork) {
  engine.handleSlowNetwork(handleSlowNetwork);
}
origin: nostra13/Android-Universal-Image-Loader

/**
 * @param cacheDir Directory for file caching
 * @param maxAge   Max file age (in seconds). If file age will exceed this value then it'll be removed on next
 *                 treatment (and therefore be reloaded).
 */
public LimitedAgeDiskCache(File cacheDir, File reserveCacheDir, long maxAge) {
  this(cacheDir, reserveCacheDir, DefaultConfigurationFactory.createFileNameGenerator(), maxAge);
}
origin: nostra13/Android-Universal-Image-Loader

/**
 * Returns disk cache
 *
 * @throws IllegalStateException if {@link #init(ImageLoaderConfiguration)} method wasn't called before
 */
public DiskCache getDiskCache() {
  checkConfiguration();
  return configuration.diskCache;
}
origin: nostra13/Android-Universal-Image-Loader

/**
 * @param cacheDir Directory for file caching
 * @param maxAge   Max file age (in seconds). If file age will exceed this value then it'll be removed on next
 *                 treatment (and therefore be reloaded).
 */
public LimitedAgeDiskCache(File cacheDir, long maxAge) {
  this(cacheDir, null, DefaultConfigurationFactory.createFileNameGenerator(), maxAge);
}
com.nostra13.universalimageloader.core

Most used classes

  • ImageLoader
    Singletone for image loading and displaying at ImageView NOTE: #init(ImageLoaderConfiguration) metho
  • DisplayImageOptions$Builder
    Builder for DisplayImageOptions
  • ImageLoaderConfiguration$Builder
    Builder for ImageLoaderConfiguration
  • FadeInBitmapDisplayer
    Displays image with "fade in" animation
  • ImageLoaderConfiguration
    Presents configuration for ImageLoader
  • ImageSize,
  • SimpleImageLoadingListener,
  • DisplayImageOptions,
  • RoundedBitmapDisplayer,
  • ImageViewAware,
  • FailReason,
  • BaseImageDecoder,
  • ImageDownloader$Scheme,
  • ImageAware,
  • ImageDecodingInfo,
  • SimpleBitmapDisplayer,
  • ImageDownloader,
  • ContentLengthInputStream,
  • ImageLoaderEngine
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now