当前位置: 首页>>代码示例>>Java>>正文


Java ImageLoadingListener类代码示例

本文整理汇总了Java中com.nostra13.universalimageloader.core.listener.ImageLoadingListener的典型用法代码示例。如果您正苦于以下问题:Java ImageLoadingListener类的具体用法?Java ImageLoadingListener怎么用?Java ImageLoadingListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ImageLoadingListener类属于com.nostra13.universalimageloader.core.listener包,在下文中一共展示了ImageLoadingListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: load

import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public void load(String imageUri,String access_token, ImageView imageView, Drawable defaultDrawable,
                 int round,ImageLoadingListener listener){
    DisplayImageOptions.Builder builder = new DisplayImageOptions.Builder();
    builder.showImageOnLoading(defaultDrawable).showImageForEmptyUri(null)
            .showImageOnFail(null).cacheInMemory(true).cacheOnDisk(true)
            .considerExifParams(true).bitmapConfig(Bitmap.Config.RGB_565);
    if (round > 0) {
        builder.displayer(new RoundedBitmapDisplayer(round));
    }
    DisplayImageOptions options = builder.build();

    try{
        if(listener == null){
            _imageLoader.displayImage(imageUri,access_token, imageView, options);
        }else{
            _imageLoader.displayImage(imageUri,access_token, imageView, options,listener);
        }
    }catch(Exception e){
        e.printStackTrace();
    }
}
 
开发者ID:yun2win,项目名称:yun2win-sdk-android,代码行数:22,代码来源:ImagePool.java

示例2: load

import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public void load(String imageUri, ImageView imageView, Drawable defaultDrawable,
                 int round,ImageLoadingListener listener){
    DisplayImageOptions.Builder builder = new DisplayImageOptions.Builder();
    builder.showImageOnLoading(defaultDrawable).showImageForEmptyUri(null)
            .showImageOnFail(null).cacheInMemory(true).cacheOnDisk(true)
            .considerExifParams(true).bitmapConfig(Bitmap.Config.RGB_565);
    if (round > 0) {
        builder.displayer(new RoundedBitmapDisplayer(round));
    }
    DisplayImageOptions options = builder.build();

    try{
        if(listener == null){
            _imageLoader.displayImage(imageUri, imageView, options);
        }else{
            _imageLoader.displayImage(imageUri, imageView, options,listener);
        }
    }catch(Exception e){
        e.printStackTrace();
    }
}
 
开发者ID:yun2win,项目名称:yun2win-sdk-android,代码行数:22,代码来源:ImagePool.java

示例3: setdailyfineimg

import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public static void setdailyfineimg(String url, ImageView imageView,
									   ImageLoadingListener listener) {
		if (dailyfines == null) {
			dailyfines = new DisplayImageOptions.Builder()
					.showImageOnLoading(0)
					.showImageForEmptyUri(0)
					.showImageOnFail(0)
					.cacheInMemory(true)
//					.cacheOnDisk(true)
					.considerExifParams(true)
					.bitmapConfig(Bitmap.Config.RGB_565)
					.imageScaleType(ImageScaleType.IN_SAMPLE_POWER_OF_2)
					.build();
		}

		ImageLoader.getInstance().displayImage(url, imageView, dailyfines,
				listener);
	}
 
开发者ID:Alex-Jerry,项目名称:LLApp,代码行数:19,代码来源:ImageLoaders.java

示例4: show

import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public static boolean show(String url, ImageView imageView, ImageLoadingListener listener){
        imageView.setImageDrawable(null);
        if(url == null)
            return false;

        if(!url.startsWith("http"))
            url = ShikiApi.HTTP_SERVER + url;

        if(url.contains(".gif") && Build.VERSION.SDK_INT > 13){
            Ion.with(imageView)
                    .animateGif(AnimateGifMode.ANIMATE)
//                    .animateLoad(R.anim.spin_animation)
                    .smartSize(true)
                    .error(R.drawable.missing_preview)
                    .load(url);
            if(listener!=null)
                listener.onLoadingComplete(null,null,null);
        }
        else
            ImageLoader.getInstance().displayImage(url, imageView, listener);
        return true;
    }
 
开发者ID:LeshiyGS,项目名称:shikimori,代码行数:23,代码来源:ShikiImage.java

示例5: loadImage

import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
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);
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:18,代码来源:ImageLoader.java

示例6: run

import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
protected static void run(Gogh g) {
    DisplayImageOptions options = g.mOptions;
    DisplayImageOptions.Builder optionsBuilder = g.mOptionsBuilder;
    if (g.mHideIfNull) {
        if (g.mUrl == null) {
            g.mView.setVisibility(View.GONE);
        } else {
            g.mView.setVisibility(View.VISIBLE);
        }
    }

    ImageLoadingListener imageLoadingListener = null;
    if (g.mOnBitmap != null || g.mTaskSource != null) {
        imageLoadingListener = new MySimpleImageLoadingListener(g.mTaskSource, g.mOnBitmap);
    }

    if (g.mAnimation != NOT_ANIMATED || g.mDisplayer != null) {
        MySimpleImageDisplayer displayer = new MySimpleImageDisplayer(g.mAnimation, g.mDisplayer);
        if (optionsBuilder == null) optionsBuilder = new DisplayImageOptions.Builder().cloneFrom(options);
        optionsBuilder.displayer(displayer).resetViewBeforeLoading(g.mAnimation != CROSS_FADE);
    }

    if (optionsBuilder != null) options = optionsBuilder.build();
    UIL.display_(g.mUrl, g.mView, imageLoadingListener, options);
}
 
开发者ID:carlosefonseca,项目名称:CEFCommon,代码行数:26,代码来源:Gogh.java

示例7: setImage

import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public static void setImage(ImageView view, Uri imageUri, int defaultPlaceholder,
		ImageLoadingListener loadingListener) {
	if (view == null)
		return;

	if (imageUri != null) {
		String uri = imageUri.toString();

		if (uri.startsWith("file:/") && !uri.startsWith("file:///")) {
			uri = uri.replace("file:/", "file:///");
		}

		uri = Uri.decode(uri);

		ImageLoader.getInstance().displayImage(uri, view, loadingListener);
	} else {
		view.setImageResource(defaultPlaceholder);
	}
}
 
开发者ID:gandulf,项目名称:DsaTab,代码行数:20,代码来源:Util.java

示例8: ImageLoadingInfo

import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
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;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:13,代码来源:ImageLoadingInfo.java

示例9: setProfileImage

import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public static void setProfileImage(String url, ImageView imgView, ImageLoadingListener listener) {
    if (url != null) {
        if (ImageLoader.getInstance() != null) {
            ImageLoader.getInstance().displayImage(url, imgView, Util.displayImageOptions_circluar, listener);
        }
    }
}
 
开发者ID:AppHero2,项目名称:Raffler-Android,代码行数:8,代码来源:Util.java

示例10: setURLImage

import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public static void setURLImage(String url, ImageView imgView, ImageLoadingListener listener) {
    if (url != null) {
        if (ImageLoader.getInstance() != null) {
            ImageLoader.getInstance().displayImage(url, imgView, Util.displayImageOptions_original, listener);
        }
    }
}
 
开发者ID:AppHero2,项目名称:Raffler-Android,代码行数:8,代码来源:Util.java

示例11: loadImage

import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
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);
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:11,代码来源:ImageLoader.java

示例12: ImageLoadingInfo

import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
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;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:11,代码来源:ImageLoadingInfo.java

示例13: loadImage

import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
public synchronized void loadImage(String url, ImageView imageView, ImageLoadingListener loadingListener) {
    if (ImageLoader.getInstance().isInited()) {
        if (!(TextUtils.isEmpty(url) || imageView == null)) {
            ImageLoader.getInstance().displayImage(url, imageView, this.options, loadingListener);
        }
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:8,代码来源:LetvCacheMannager.java

示例14: ImageLoadingInfo

import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
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;

      mFileTypeStatus = BitmapDisplayer.FILE_TYPE_UNDEFINE;
      mFilePath = null;
  }
 
开发者ID:Spencer231,项目名称:GifImageLoader,代码行数:16,代码来源:ImageLoadingInfo.java

示例15: loadImage

import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; //导入依赖的package包/类
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);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:14,代码来源:ImageLoader.java


注:本文中的com.nostra13.universalimageloader.core.listener.ImageLoadingListener类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。