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

The following examples show how to use com.nostra13.universalimageloader.core.listener.ImageLoadingProgressListener. 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 File: ImageLoader.java    From MiBandDecompiled with 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 File: ImageLoadingInfo.java    From BigApp_WordPress_Android with 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 File: ImageLoadingInfo.java    From android-open-project-demo with 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 #4
Source File: ImageLoadingInfo.java    From Android-Universal-Image-Loader-Modify with 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 File: ImageLoader.java    From Android-Universal-Image-Loader-Modify with Apache License 2.0 5 votes vote down vote up
/**
 * 添加图片加载任务到执行线程池中。图片会通过回调方法返回
 * @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 #6
Source File: k.java    From MiBandDecompiled with 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 #7
Source File: ImageLoadingInfo.java    From WliveTV with 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 File: ImageLoadingInfo.java    From mobile-manager-tool with 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 #9
Source File: ImageLoadingInfo.java    From letv with 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 #10
Source File: ImageLoader.java    From letv with 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 #11
Source File: ImageLoadingInfo.java    From candybar with 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 #12
Source File: ImageLoader.java    From letv with 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 #13
Source File: ImageLoader.java    From letv with 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 #14
Source File: ImageLoader.java    From MiBandDecompiled with 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 File: ImageLoaderUtils.java    From Slide with 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 File: ImageLoaderUtils.java    From DevUtils with 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 #17
Source File: ImageLoader.java    From WliveTV with 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 #18
Source File: ImageLoader.java    From BigApp_WordPress_Android with 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 #19
Source File: ImageLoader.java    From candybar with 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 File: ImageLoader.java    From mobile-manager-tool with 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 #21
Source File: ImageLoader.java    From android-open-project-demo with 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 File: ImageLoader.java    From Android-Universal-Image-Loader-Modify with 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 #23
Source File: ImageLoader.java    From Android-Universal-Image-Loader-Modify with Apache License 2.0 2 votes vote down vote up
/**
 *
 * @param uri                图片URL地址
 * @param imageAware         imageview包装成ImageAware
 * @param options            图片显示配置参数
 * @param listener           图片加载监听器
 * @param progressListener   图片下载进度监听器
 */
public void displayImage(String uri, ImageAware imageAware, DisplayImageOptions options,
		ImageLoadingListener listener, ImageLoadingProgressListener progressListener) {
	displayImage(uri, imageAware, options, null, listener, progressListener);
}
 
Example #24
Source File: ImageLoadProxy.java    From JianDan_OkHttp with Apache License 2.0 2 votes vote down vote up
/**
 * 图片列表页专用
 *
 * @param url
 * @param target
 * @param loadingResource
 * @param loadingListener
 * @param progressListener
 */
public static void displayImageList(String url, ImageView target, int loadingResource, SimpleImageLoadingListener loadingListener, ImageLoadingProgressListener progressListener) {
    imageLoader.displayImage(url, target, getOptions4PictureList(loadingResource), loadingListener, progressListener);
}
 
Example #25
Source File: ImageLoader.java    From android-open-project-demo with 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 #26
Source File: ImageLoaderUtils.java    From DevUtils with 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 #27
Source File: ImageLoader.java    From candybar with 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 #28
Source File: ImageLoadProxy.java    From JianDanRxJava with Apache License 2.0 2 votes vote down vote up
/**
 * 图片列表页专用
 *
 * @param url
 * @param target
 * @param loadingResource
 * @param loadingListener
 * @param progressListener
 */
public static void displayImageList(String url, ImageView target, int loadingResource, SimpleImageLoadingListener loadingListener, ImageLoadingProgressListener progressListener) {
    imageLoader.displayImage(url, target, getOptions4PictureList(loadingResource), loadingListener, progressListener);
}
 
Example #29
Source File: ImageLoadProxy.java    From JianDan with Apache License 2.0 2 votes vote down vote up
/**
 * 图片列表页专用
 *
 * @param url
 * @param target
 * @param loadingResource
 * @param loadingListener
 * @param progressListener
 */
public static void displayImageList(String url, ImageView target, int loadingResource, SimpleImageLoadingListener loadingListener, ImageLoadingProgressListener progressListener) {
    imageLoader.displayImage(url, target, getOptions4PictureList(loadingResource), loadingListener, progressListener);
}
 
Example #30
Source File: ImageLoadProxy.java    From JianDan_OkHttpWithVolley with Apache License 2.0 2 votes vote down vote up
/**
 * 图片列表页专用
 *
 * @param url
 * @param target
 * @param loadingResource
 * @param loadingListener
 * @param progressListener
 */
public static void displayImageList(String url, ImageView target, int loadingResource, SimpleImageLoadingListener loadingListener, ImageLoadingProgressListener progressListener) {
    imageLoader.displayImage(url, target, getOptions4PictureList(loadingResource), loadingListener, progressListener);
}