Java Code Examples for com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener

The following examples show how to use com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: MiBandDecompiled   Source File: ImageLoader.java    License: Apache License 2.0 6 votes vote down vote up
public void loadImage(String s, ImageSize imagesize, DisplayImageOptions displayimageoptions, ImageLoadingListener imageloadinglistener, ImageLoadingProgressListener imageloadingprogresslistener)
{
    a();
    if (imagesize == null)
    {
        imagesize = h.a();
    }
    DisplayImageOptions displayimageoptions1;
    if (displayimageoptions == null)
    {
        displayimageoptions1 = h.r;
    } else
    {
        displayimageoptions1 = displayimageoptions;
    }
    displayImage(s, new NonViewAware(s, imagesize, ViewScaleType.CROP), displayimageoptions1, imageloadinglistener, imageloadingprogresslistener);
}
 
Example 2
Source Project: candybar   Source File: ImageLoadingInfo.java    License: Apache License 2.0 5 votes vote down vote up
public ImageLoadingInfo(String uri, ImageAware imageAware, ImageSize targetSize, String memoryCacheKey,
                        DisplayImageOptions options, ImageLoadingListener listener,
                        ImageLoadingProgressListener progressListener, ReentrantLock loadFromUriLock) {
    this.uri = uri;
    this.imageAware = imageAware;
    this.targetSize = targetSize;
    this.options = options;
    this.listener = listener;
    this.progressListener = progressListener;
    this.loadFromUriLock = loadFromUriLock;
    this.memoryCacheKey = memoryCacheKey;
}
 
Example 3
Source Project: letv   Source File: ImageLoader.java    License: Apache License 2.0 5 votes vote down vote up
public void loadImage(String uri, ImageSize targetImageSize, DisplayImageOptions options, ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
    checkConfiguration();
    if (targetImageSize == null) {
        targetImageSize = this.configuration.getMaxImageSize();
    }
    if (options == null) {
        options = this.configuration.defaultDisplayImageOptions;
    }
    displayImage(uri, new NonViewAware(uri, targetImageSize, ViewScaleType.CROP), options, listener, progressListener);
}
 
Example 4
Source Project: letv   Source File: ImageLoadingInfo.java    License: Apache License 2.0 5 votes vote down vote up
public ImageLoadingInfo(String uri, ImageAware imageAware, ImageSize targetSize, String memoryCacheKey, DisplayImageOptions options, ImageLoadingListener listener, ImageLoadingProgressListener progressListener, ReentrantLock loadFromUriLock) {
    this.uri = uri;
    this.imageAware = imageAware;
    this.targetSize = targetSize;
    this.options = options;
    this.listener = listener;
    this.progressListener = progressListener;
    this.loadFromUriLock = loadFromUriLock;
    this.memoryCacheKey = memoryCacheKey;
}
 
Example 5
Source Project: mobile-manager-tool   Source File: ImageLoadingInfo.java    License: MIT License 5 votes vote down vote up
public ImageLoadingInfo(String uri, ImageAware imageAware, ImageSize targetSize, String memoryCacheKey,
		DisplayImageOptions options, ImageLoadingListener listener,
		ImageLoadingProgressListener progressListener, ReentrantLock loadFromUriLock) {
	this.uri = uri;
	this.imageAware = imageAware;
	this.targetSize = targetSize;
	this.options = options;
	this.listener = listener;
	this.progressListener = progressListener;
	this.loadFromUriLock = loadFromUriLock;
	this.memoryCacheKey = memoryCacheKey;
}
 
Example 6
Source Project: BigApp_WordPress_Android   Source File: ImageLoadingInfo.java    License: Apache License 2.0 5 votes vote down vote up
public ImageLoadingInfo(String uri, ImageAware imageAware, ImageSize targetSize, String memoryCacheKey,
		DisplayImageOptions options, ImageLoadingListener listener,
		ImageLoadingProgressListener progressListener, ReentrantLock loadFromUriLock) {
	this.uri = uri;
	this.imageAware = imageAware;
	this.targetSize = targetSize;
	this.options = options;
	this.listener = listener;
	this.progressListener = progressListener;
	this.loadFromUriLock = loadFromUriLock;
	this.memoryCacheKey = memoryCacheKey;
}
 
Example 7
Source Project: WliveTV   Source File: ImageLoadingInfo.java    License: Apache License 2.0 5 votes vote down vote up
public ImageLoadingInfo(String uri, ImageAware imageAware, ImageSize targetSize, String memoryCacheKey,
		DisplayImageOptions options, ImageLoadingListener listener,
		ImageLoadingProgressListener progressListener, ReentrantLock loadFromUriLock) {
	this.uri = uri;
	this.imageAware = imageAware;
	this.targetSize = targetSize;
	this.options = options;
	this.listener = listener;
	this.progressListener = progressListener;
	this.loadFromUriLock = loadFromUriLock;
	this.memoryCacheKey = memoryCacheKey;
}
 
Example 8
Source Project: MiBandDecompiled   Source File: k.java    License: Apache License 2.0 5 votes vote down vote up
public k(String s, ImageAware imageaware, ImageSize imagesize, String s1, DisplayImageOptions displayimageoptions, ImageLoadingListener imageloadinglistener, ImageLoadingProgressListener imageloadingprogresslistener, 
        ReentrantLock reentrantlock)
{
    a = s;
    c = imageaware;
    d = imagesize;
    e = displayimageoptions;
    f = imageloadinglistener;
    g = imageloadingprogresslistener;
    h = reentrantlock;
    b = s1;
}
 
Example 9
/**
 * 添加图片加载任务到执行线程池中。图片会通过回调方法返回
 * @param uri                 图片URL地址
 * @param targetImageSize     期望目标图片大小尺寸
 * @param options             图片配置项
 * @param listener            图片加载监听器
 * @param progressListener    图片下载进度监听器
 */
public void loadImage(String uri, ImageSize targetImageSize, DisplayImageOptions options,
		ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
	checkConfiguration();
	if (targetImageSize == null) {
		targetImageSize = configuration.getMaxImageSize();
	}
	if (options == null) {
		options = configuration.defaultDisplayImageOptions;
	}

	NonViewAware imageAware = new NonViewAware(uri, targetImageSize, ViewScaleType.CROP);
	displayImage(uri, imageAware, options, listener, progressListener);
}
 
Example 10
public ImageLoadingInfo(String uri, ImageAware imageAware, ImageSize targetSize, String memoryCacheKey,
		DisplayImageOptions options, ImageLoadingListener listener,
		ImageLoadingProgressListener progressListener, ReentrantLock loadFromUriLock) {
	this.uri = uri;
	this.imageAware = imageAware;
	this.targetSize = targetSize;
	this.options = options;
	this.listener = listener;
	this.progressListener = progressListener;
	this.loadFromUriLock = loadFromUriLock;
	this.memoryCacheKey = memoryCacheKey;
}
 
Example 11
public ImageLoadingInfo(String uri, ImageAware imageAware, ImageSize targetSize, String memoryCacheKey,
		DisplayImageOptions options, ImageLoadingListener listener,
		ImageLoadingProgressListener progressListener, ReentrantLock loadFromUriLock) {
	this.uri = uri;
	this.imageAware = imageAware;
	this.targetSize = targetSize;
	this.options = options;
	this.listener = listener;
	this.progressListener = progressListener;
	this.loadFromUriLock = loadFromUriLock;
	this.memoryCacheKey = memoryCacheKey;
}
 
Example 12
Source Project: letv   Source File: ImageLoader.java    License: Apache License 2.0 4 votes vote down vote up
public void displayImage(String uri, ImageAware imageAware, DisplayImageOptions options, ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
    checkConfiguration();
    if (imageAware == null) {
        throw new IllegalArgumentException(ERROR_WRONG_ARGUMENTS);
    }
    if (listener == null) {
        listener = this.emptyListener;
    }
    if (options == null) {
        options = this.configuration.defaultDisplayImageOptions;
    }
    if (TextUtils.isEmpty(uri)) {
        this.engine.cancelDisplayTaskFor(imageAware);
        listener.onLoadingStarted(uri, imageAware.getWrappedView());
        if (options.shouldShowImageForEmptyUri()) {
            imageAware.setImageDrawable(options.getImageForEmptyUri(this.configuration.resources));
        } else {
            imageAware.setImageDrawable(null);
        }
        listener.onLoadingComplete(uri, imageAware.getWrappedView(), null);
        return;
    }
    ImageSize targetSize = ImageSizeUtils.defineTargetSizeForView(imageAware, this.configuration.getMaxImageSize());
    String memoryCacheKey = MemoryCacheUtils.generateKey(uri, targetSize);
    this.engine.prepareDisplayTaskFor(imageAware, memoryCacheKey);
    listener.onLoadingStarted(uri, imageAware.getWrappedView());
    Bitmap bmp = (Bitmap) this.configuration.memoryCache.get(memoryCacheKey);
    if (bmp == null || bmp.isRecycled()) {
        if (options.shouldShowImageOnLoading()) {
            imageAware.setImageDrawable(options.getImageOnLoading(this.configuration.resources));
        } else if (options.isResetViewBeforeLoading()) {
            imageAware.setImageDrawable(null);
        }
        LoadAndDisplayImageTask displayTask = new LoadAndDisplayImageTask(this.engine, new ImageLoadingInfo(uri, imageAware, targetSize, memoryCacheKey, options, listener, progressListener, this.engine.getLockForUri(uri)), defineHandler(options));
        if (options.isSyncLoading()) {
            displayTask.run();
            return;
        } else {
            this.engine.submit(displayTask);
            return;
        }
    }
    L.d(LOG_LOAD_IMAGE_FROM_MEMORY_CACHE, memoryCacheKey);
    if (options.shouldPostProcess()) {
        ProcessAndDisplayImageTask displayTask2 = new ProcessAndDisplayImageTask(this.engine, bmp, new ImageLoadingInfo(uri, imageAware, targetSize, memoryCacheKey, options, listener, progressListener, this.engine.getLockForUri(uri)), defineHandler(options));
        if (options.isSyncLoading()) {
            displayTask2.run();
            return;
        } else {
            this.engine.submit(displayTask2);
            return;
        }
    }
    options.getDisplayer().display(bmp, imageAware, LoadedFrom.MEMORY_CACHE);
    listener.onLoadingComplete(uri, imageAware.getWrappedView(), bmp);
}
 
Example 13
Source Project: letv   Source File: ImageLoader.java    License: Apache License 2.0 4 votes vote down vote up
public void displayImage(String uri, ImageView imageView, DisplayImageOptions options, ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
    displayImage(uri, new ImageViewAware(imageView), options, listener, progressListener);
}
 
Example 14
Source Project: MiBandDecompiled   Source File: ImageLoader.java    License: Apache License 2.0 4 votes vote down vote up
public void displayImage(String s, ImageView imageview, DisplayImageOptions displayimageoptions, ImageLoadingListener imageloadinglistener, ImageLoadingProgressListener imageloadingprogresslistener)
{
    displayImage(s, ((ImageAware) (new ImageViewAware(imageview))), displayimageoptions, imageloadinglistener, imageloadingprogresslistener);
}
 
Example 15
Source Project: Slide   Source File: ImageLoaderUtils.java    License: GNU General Public License v3.0 4 votes vote down vote up
@Override
public void displayImage(String uri, ImageAware imageAware, DisplayImageOptions options,
        ImageSize targetSize, ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
    String newUri = StringEscapeUtils.unescapeHtml4(uri);
    super.displayImage(newUri, imageAware, options, targetSize, listener, progressListener);
}
 
Example 16
Source Project: candybar   Source File: ImageLoader.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * Adds load image task to execution pool. Image will be returned with
 * {@link ImageLoadingListener#onLoadingComplete(String, android.view.View, android.graphics.Bitmap)} callback}.
 * <br />
 * <b>NOTE:</b> {@link #init(ImageLoaderConfiguration)} method must be called before this method call
 *
 * @param uri              Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")
 * @param targetImageSize  Minimal size for {@link Bitmap} which will be returned in
 *                         {@linkplain ImageLoadingListener#onLoadingComplete(String, android.view.View,
 *                         android.graphics.Bitmap)} callback}. Downloaded image will be decoded
 *                         and scaled to {@link Bitmap} of the size which is <b>equal or larger</b> (usually a bit
 *                         larger) than incoming targetImageSize.
 * @param options          {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions Options} for image
 *                         decoding and displaying. If <b>null</b> - default display image options
 *                         {@linkplain ImageLoaderConfiguration.Builder#defaultDisplayImageOptions(DisplayImageOptions)
 *                         from configuration} will be used.<br />
 * @param listener         {@linkplain ImageLoadingListener Listener} for image loading process. Listener fires
 *                         events on UI thread if this method is called on UI thread.
 * @param progressListener {@linkplain com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener
 *                         Listener} for image loading progress. Listener fires events on UI thread if this method
 *                         is called on UI thread. Caching on disk should be enabled in
 *                         {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions options} to make
 *                         this listener work.
 * @throws IllegalStateException if {@link #init(ImageLoaderConfiguration)} method wasn't called before
 */
public void loadImage(String uri, ImageSize targetImageSize, DisplayImageOptions options,
                      ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
    checkConfiguration();
    if (targetImageSize == null) {
        targetImageSize = configuration.getMaxImageSize();
    }
    if (options == null) {
        options = configuration.defaultDisplayImageOptions;
    }

    NonViewAware imageAware = new NonViewAware(uri, targetImageSize, ViewScaleType.CROP);
    displayImage(uri, imageAware, options, listener, progressListener);
}
 
Example 17
Source Project: DevUtils   Source File: ImageLoaderUtils.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * 图片显示
 * @param uri              Image Uri
 * @param imageView        ImageView
 * @param options          {@link DisplayImageOptions}
 * @param listener         加载监听事件
 * @param progressListener 图片下载监听事件
 */
public static void displayImage(final String uri, final ImageView imageView,
                                final DisplayImageOptions options, final ImageLoadingListener listener,
                                final ImageLoadingProgressListener progressListener) {
    if (imageView != null) {
        ImageLoader.getInstance().displayImage(uri, imageView, options, listener, progressListener);
    }
}
 
Example 18
Source Project: mobile-manager-tool   Source File: ImageLoader.java    License: MIT License 3 votes vote down vote up
/**
 * Adds load image task to execution pool. Image will be returned with
 * {@link com.nostra13.universalimageloader.core.listener.ImageLoadingListener#onLoadingComplete(String, android.view.View, android.graphics.Bitmap)} callback}.
 * <br />
 * <b>NOTE:</b> {@link #init(com.nostra13.universalimageloader.core.ImageLoaderConfiguration)} method must be called before this method call
 *
 * @param uri              Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")
 * @param targetImageSize  Minimal size for {@link android.graphics.Bitmap} which will be returned in
 *                         {@linkplain com.nostra13.universalimageloader.core.listener.ImageLoadingListener#onLoadingComplete(String, android.view.View,
 *                         android.graphics.Bitmap)} callback}. Downloaded image will be decoded
 *                         and scaled to {@link android.graphics.Bitmap} of the size which is <b>equal or larger</b> (usually a bit
 *                         larger) than incoming targetImageSize.
 * @param options          {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions Options} for image
 *                         decoding and displaying. If <b>null</b> - default display image options
 *                         {@linkplain com.nostra13.universalimageloader.core.ImageLoaderConfiguration.Builder#defaultDisplayImageOptions(com.nostra13.universalimageloader.core.DisplayImageOptions)
 *                         from configuration} will be used.<br />
 * @param listener         {@linkplain com.nostra13.universalimageloader.core.listener.ImageLoadingListener Listener} for image loading process. Listener fires
 *                         events on UI thread if this method is called on UI thread.
 * @param progressListener {@linkplain com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener
 *                         Listener} for image loading progress. Listener fires events on UI thread if this method
 *                         is called on UI thread. Caching on disk should be enabled in
 *                         {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions options} to make
 *                         this listener work.
 * @throws IllegalStateException if {@link #init(com.nostra13.universalimageloader.core.ImageLoaderConfiguration)} method wasn't called before
 */
public void loadImage(String uri, ImageSize targetImageSize, DisplayImageOptions options,
		ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
	checkConfiguration();
	if (targetImageSize == null) {
		targetImageSize = configuration.getMaxImageSize();
	}
	if (options == null) {
		options = configuration.defaultDisplayImageOptions;
	}

	NonViewAware imageAware = new NonViewAware(uri, targetImageSize, ViewScaleType.CROP);
	displayImage(uri, imageAware, options, listener, progressListener);
}
 
Example 19
Source Project: BigApp_WordPress_Android   Source File: ImageLoader.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * Adds load image task to execution pool. Image will be returned with
 * {@link ImageLoadingListener#onLoadingComplete(String, android.view.View, android.graphics.Bitmap)} callback}.
 * <br />
 * <b>NOTE:</b> {@link #init(ImageLoaderConfiguration)} method must be called before this method call
 *
 * @param uri              Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")
 * @param targetImageSize  Minimal size for {@link Bitmap} which will be returned in
 *                         {@linkplain ImageLoadingListener#onLoadingComplete(String, android.view.View,
 *                         android.graphics.Bitmap)} callback}. Downloaded image will be decoded
 *                         and scaled to {@link Bitmap} of the size which is <b>equal or larger</b> (usually a bit
 *                         larger) than incoming targetImageSize.
 * @param options          {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions Options} for image
 *                         decoding and displaying. If <b>null</b> - default display image options
 *                         {@linkplain ImageLoaderConfiguration.Builder#defaultDisplayImageOptions(DisplayImageOptions)
 *                         from configuration} will be used.<br />
 * @param listener         {@linkplain ImageLoadingListener Listener} for image loading process. Listener fires
 *                         events on UI thread if this method is called on UI thread.
 * @param progressListener {@linkplain com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener
 *                         Listener} for image loading progress. Listener fires events on UI thread if this method
 *                         is called on UI thread. Caching on disk should be enabled in
 *                         {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions options} to make
 *                         this listener work.
 * @throws IllegalStateException if {@link #init(ImageLoaderConfiguration)} method wasn't called before
 */
public void loadImage(String uri, ImageSize targetImageSize, DisplayImageOptions options,
		ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
	checkConfiguration();
	if (targetImageSize == null) {
		targetImageSize = configuration.getMaxImageSize();
	}
	if (options == null) {
		options = configuration.defaultDisplayImageOptions;
	}

	NonViewAware imageAware = new NonViewAware(uri, targetImageSize, ViewScaleType.CROP);
	displayImage(uri, imageAware, options, listener, progressListener);
}
 
Example 20
Source Project: WliveTV   Source File: ImageLoader.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * Adds load image task to execution pool. Image will be returned with
 * {@link ImageLoadingListener#onLoadingComplete(String, android.view.View, android.graphics.Bitmap)} callback}.
 * <br />
 * <b>NOTE:</b> {@link #init(ImageLoaderConfiguration)} method must be called before this method call
 *
 * @param uri              Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")
 * @param targetImageSize  Minimal size for {@link Bitmap} which will be returned in
 *                         {@linkplain ImageLoadingListener#onLoadingComplete(String, android.view.View,
 *                         android.graphics.Bitmap)} callback}. Downloaded image will be decoded
 *                         and scaled to {@link Bitmap} of the size which is <b>equal or larger</b> (usually a bit
 *                         larger) than incoming targetImageSize.
 * @param options          {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions Options} for image
 *                         decoding and displaying. If <b>null</b> - default display image options
 *                         {@linkplain ImageLoaderConfiguration.Builder#defaultDisplayImageOptions(DisplayImageOptions)
 *                         from configuration} will be used.<br />
 * @param listener         {@linkplain ImageLoadingListener Listener} for image loading process. Listener fires
 *                         events on UI thread if this method is called on UI thread.
 * @param progressListener {@linkplain com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener
 *                         Listener} for image loading progress. Listener fires events on UI thread if this method
 *                         is called on UI thread. Caching on disk should be enabled in
 *                         {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions options} to make
 *                         this listener work.
 * @throws IllegalStateException if {@link #init(ImageLoaderConfiguration)} method wasn't called before
 */
public void loadImage(String uri, ImageSize targetImageSize, DisplayImageOptions options,
		ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
	checkConfiguration();
	if (targetImageSize == null) {
		targetImageSize = configuration.getMaxImageSize();
	}
	if (options == null) {
		options = configuration.defaultDisplayImageOptions;
	}

	NonViewAware imageAware = new NonViewAware(uri, targetImageSize, ViewScaleType.CROP);
	displayImage(uri, imageAware, options, listener, progressListener);
}
 
Example 21
Source Project: android-open-project-demo   Source File: ImageLoader.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * Adds load image task to execution pool. Image will be returned with
 * {@link ImageLoadingListener#onLoadingComplete(String, android.view.View, android.graphics.Bitmap)} callback}.
 * <br />
 * <b>NOTE:</b> {@link #init(ImageLoaderConfiguration)} method must be called before this method call
 *
 * @param uri              Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")
 * @param targetImageSize  Minimal size for {@link Bitmap} which will be returned in
 *                         {@linkplain ImageLoadingListener#onLoadingComplete(String, android.view.View,
 *                         android.graphics.Bitmap)} callback}. Downloaded image will be decoded
 *                         and scaled to {@link Bitmap} of the size which is <b>equal or larger</b> (usually a bit
 *                         larger) than incoming targetImageSize.
 * @param options          {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions Options} for image
 *                         decoding and displaying. If <b>null</b> - default display image options
 *                         {@linkplain ImageLoaderConfiguration.Builder#defaultDisplayImageOptions(DisplayImageOptions)
 *                         from configuration} will be used.<br />
 * @param listener         {@linkplain ImageLoadingListener Listener} for image loading process. Listener fires
 *                         events on UI thread if this method is called on UI thread.
 * @param progressListener {@linkplain com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener
 *                         Listener} for image loading progress. Listener fires events on UI thread if this method
 *                         is called on UI thread. Caching on disk should be enabled in
 *                         {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions options} to make
 *                         this listener work.
 * @throws IllegalStateException if {@link #init(ImageLoaderConfiguration)} method wasn't called before
 */
public void loadImage(String uri, ImageSize targetImageSize, DisplayImageOptions options,
		ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
	checkConfiguration();
	if (targetImageSize == null) {
		targetImageSize = configuration.getMaxImageSize();
	}
	if (options == null) {
		options = configuration.defaultDisplayImageOptions;
	}

	NonViewAware imageAware = new NonViewAware(uri, targetImageSize, ViewScaleType.CROP);
	displayImage(uri, imageAware, options, listener, progressListener);
}
 
Example 22
Source Project: candybar   Source File: ImageLoader.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * Adds display image task to execution pool. Image will be set to ImageAware when it's turn.<br />
 * <b>NOTE:</b> {@link #init(ImageLoaderConfiguration)} method must be called before this method call
 *
 * @param uri              Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")
 * @param imageAware       {@linkplain com.nostra13.universalimageloader.core.imageaware.ImageAware Image aware view}
 *                         which should display image
 * @param options          {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions Options} for image
 *                         decoding and displaying. If <b>null</b> - default display image options
 *                         {@linkplain ImageLoaderConfiguration.Builder#defaultDisplayImageOptions(DisplayImageOptions)
 *                         from configuration} will be used.
 * @param listener         {@linkplain ImageLoadingListener Listener} for image loading process. Listener fires
 *                         events on UI thread if this method is called on UI thread.
 * @param progressListener {@linkplain com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener
 *                         Listener} for image loading progress. Listener fires events on UI thread if this method
 *                         is called on UI thread. Caching on disk should be enabled in
 *                         {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions options} to make
 *                         this listener work.
 * @throws IllegalStateException    if {@link #init(ImageLoaderConfiguration)} method wasn't called before
 * @throws IllegalArgumentException if passed <b>imageAware</b> is null
 */
public void displayImage(String uri, ImageAware imageAware, DisplayImageOptions options,
                         ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
    displayImage(uri, imageAware, options, null, listener, progressListener);
}
 
Example 23
Source Project: candybar   Source File: ImageLoader.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * Adds display image task to execution pool. Image will be set to ImageView when it's turn.<br />
 * <b>NOTE:</b> {@link #init(ImageLoaderConfiguration)} method must be called before this method call
 *
 * @param uri              Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")
 * @param imageView        {@link ImageView} which should display image
 * @param options          {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions Options} for image
 *                         decoding and displaying. If <b>null</b> - default display image options
 *                         {@linkplain ImageLoaderConfiguration.Builder#defaultDisplayImageOptions(DisplayImageOptions)
 *                         from configuration} will be used.
 * @param listener         {@linkplain ImageLoadingListener Listener} for image loading process. Listener fires
 *                         events on UI thread if this method is called on UI thread.
 * @param progressListener {@linkplain com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener
 *                         Listener} for image loading progress. Listener fires events on UI thread if this method
 *                         is called on UI thread. Caching on disk should be enabled in
 *                         {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions options} to make
 *                         this listener work.
 * @throws IllegalStateException    if {@link #init(ImageLoaderConfiguration)} method wasn't called before
 * @throws IllegalArgumentException if passed <b>imageView</b> is null
 */
public void displayImage(String uri, ImageView imageView, DisplayImageOptions options,
                         ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
    displayImage(uri, new ImageViewAware(imageView), options, listener, progressListener);
}
 
Example 24
Source Project: DevUtils   Source File: ImageLoaderUtils.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 图片显示
 * @param uri              Image Uri
 * @param imageView        ImageView
 * @param listener         加载监听事件
 * @param progressListener 图片下载监听事件
 */
public static void displayImage(final String uri, final ImageView imageView,
                                final ImageLoadingListener listener,
                                final ImageLoadingProgressListener progressListener) {
    displayImage(uri, imageView, null, listener, progressListener);
}
 
Example 25
Source Project: DevUtils   Source File: ImageLoaderUtils.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 图片加载
 * @param uri              Image Uri
 * @param imageSize        {@link ImageSize}
 * @param listener         加载监听事件
 * @param progressListener 图片下载监听事件
 */
public static void loadImage(final String uri, final ImageSize imageSize,
                             final ImageLoadingListener listener,
                             final ImageLoadingProgressListener progressListener) {
    loadImage(uri, imageSize, null, listener, progressListener);
}
 
Example 26
Source Project: DevUtils   Source File: ImageLoaderUtils.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 图片加载
 * @param uri              Image Uri
 * @param listener         加载监听事件
 * @param progressListener 图片下载监听事件
 */
public static void loadImage(final String uri, final ImageLoadingListener listener,
                             final ImageLoadingProgressListener progressListener) {
    loadImage(uri, null, null, listener, progressListener);
}
 
Example 27
Source Project: DevUtils   Source File: ImageLoaderUtils.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 图片加载
 * @param uri              Image Uri
 * @param options          {@link DisplayImageOptions}
 * @param listener         加载监听事件
 * @param progressListener 图片下载监听事件
 */
public static void loadImage(final String uri, final DisplayImageOptions options,
                             final ImageLoadingListener listener, final ImageLoadingProgressListener progressListener) {
    loadImage(uri, null, options, listener, progressListener);
}
 
Example 28
Source Project: DevUtils   Source File: ImageLoaderUtils.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 图片加载
 * @param uri              Image Uri
 * @param imageSize        {@link ImageSize}
 * @param options          {@link DisplayImageOptions}
 * @param listener         加载监听事件
 * @param progressListener 图片下载监听事件
 */
public static void loadImage(final String uri, final ImageSize imageSize, final DisplayImageOptions options,
                             final ImageLoadingListener listener, final ImageLoadingProgressListener progressListener) {
    ImageLoader.getInstance().loadImage(uri, imageSize, options, listener, progressListener);
}
 
Example 29
Source Project: mobile-manager-tool   Source File: ImageLoader.java    License: MIT License 2 votes vote down vote up
/**
 * Adds display image task to execution pool. Image will be set to ImageView when it's turn.<br />
 * <b>NOTE:</b> {@link #init(com.nostra13.universalimageloader.core.ImageLoaderConfiguration)} method must be called before this method call
 *
 * @param uri              Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")
 * @param imageView        {@link android.widget.ImageView} which should display image
 * @param options          {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions Options} for image
 *                         decoding and displaying. If <b>null</b> - default display image options
 *                         {@linkplain com.nostra13.universalimageloader.core.ImageLoaderConfiguration.Builder#defaultDisplayImageOptions(com.nostra13.universalimageloader.core.DisplayImageOptions)
 *                         from configuration} will be used.
 * @param listener         {@linkplain com.nostra13.universalimageloader.core.listener.ImageLoadingListener Listener} for image loading process. Listener fires
 *                         events on UI thread if this method is called on UI thread.
 * @param progressListener {@linkplain com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener
 *                         Listener} for image loading progress. Listener fires events on UI thread if this method
 *                         is called on UI thread. Caching on disk should be enabled in
 *                         {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions options} to make
 *                         this listener work.
 * @throws IllegalStateException    if {@link #init(com.nostra13.universalimageloader.core.ImageLoaderConfiguration)} method wasn't called before
 * @throws IllegalArgumentException if passed <b>imageView</b> is null
 */
public void displayImage(String uri, ImageView imageView, DisplayImageOptions options,
		ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
	displayImage(uri, new ImageViewAware(imageView), options, listener, progressListener);
}
 
Example 30
Source Project: BigApp_WordPress_Android   Source File: ImageLoader.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * Adds display image task to execution pool. Image will be set to ImageAware when it's turn.<br />
 * <b>NOTE:</b> {@link #init(ImageLoaderConfiguration)} method must be called before this method call
 *
 * @param uri              Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")
 * @param imageAware       {@linkplain com.nostra13.universalimageloader.core.imageaware.ImageAware Image aware view}
 *                         which should display image
 * @param options          {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions Options} for image
 *                         decoding and displaying. If <b>null</b> - default display image options
 *                         {@linkplain ImageLoaderConfiguration.Builder#defaultDisplayImageOptions(DisplayImageOptions)
 *                         from configuration} will be used.
 * @param listener         {@linkplain ImageLoadingListener Listener} for image loading process. Listener fires
 *                         events on UI thread if this method is called on UI thread.
 * @param progressListener {@linkplain com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener
 *                         Listener} for image loading progress. Listener fires events on UI thread if this method
 *                         is called on UI thread. Caching on disk should be enabled in
 *                         {@linkplain com.nostra13.universalimageloader.core.DisplayImageOptions options} to make
 *                         this listener work.
 * @throws IllegalStateException    if {@link #init(ImageLoaderConfiguration)} method wasn't called before
 * @throws IllegalArgumentException if passed <b>imageAware</b> is null
 */
public void displayImage(String uri, ImageAware imageAware, DisplayImageOptions options,
		ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
	displayImage(uri, imageAware, options, null, listener, progressListener);
}