當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。