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(); } }
public void load(String imageUri,String access_token, ImageView imageView, int defaultDrawable, int round,ImageLoadingListener listener) { if(StringUtil.isEmpty(imageUri)){ imageUri = "http://www.liyueyun.com"; } 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(); } }
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(); } }
public void load(String imageUri, ImageView imageView, int defaultDrawable, int round,ImageLoadingListener listener) { if(imageUri == null){ imageUri = "http://www.liyueyun.com"; } 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(); } }
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); }
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; }
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); }
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); }
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); } }
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; }
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); } } }
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); } } }
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); }
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); } } }
public synchronized void loadImage(String url, ImageView imageView, DisplayImageOptions options, ImageLoadingListener loadingListener) { if (ImageLoader.getInstance().isInited()) { if (!(TextUtils.isEmpty(url) || imageView == null)) { ImageLoader.getInstance().displayImage(url, imageView, options, loadingListener); } } }
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; }
public void getWithListener(String imageUri,String access_token,ImageLoadingListener listener,int round,int defaultDrawable) { Bitmap bitmap = null; bitmap = _imageLoader.loadImageSync(imageUri,access_token); if(bitmap != null){ if(listener != null){ listener.onLoadingComplete(imageUri, null, bitmap); } }else{ get(imageUri,access_token, listener,0); } }
public void get(String imageUri,String access_token,ImageLoadingListener listener,int round){ DisplayImageOptions.Builder builder = new DisplayImageOptions.Builder(); builder.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(); _imageLoader.loadImage(imageUri, access_token, options, listener); }
public void getWithListener(String imageUri,ImageLoadingListener listener,int round,int defaultDrawable) { Bitmap bitmap = null; bitmap = _imageLoader.loadImageSync(imageUri); if(bitmap != null){ if(listener != null){ listener.onLoadingComplete(imageUri, null, bitmap); } }else{ get(imageUri, listener,0); } }
public void get(String imageUri,ImageLoadingListener listener,int round){ DisplayImageOptions.Builder builder = new DisplayImageOptions.Builder(); builder.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(); _imageLoader.loadImage(imageUri, options, listener); }
/** * 异步加载网络图片 */ public static void displayImage(String url, ImageView view, ImageLoadingListener listener, int defaultImgRes) { if (view == null) { return; } mOptions = getDisplayImageOptionsFactory(defaultImgRes); mImageLoader.displayImage(url, view, mOptions, listener); }
public void displayImage(String imagePath, ImageView imageView, ImageLoadingListener listener) { if (options_none == null) { this.options_none = getOptions().cacheInMemory(false) .cacheOnDisk(false).build(); } imageLoader.displayImage(imagePath, imageView, options_none, listener); }
public void displayImageWp(String imagePath, ImageView imageView, ImageLoadingListener listener) { if (options_none == null) { this.options_none = getOptionsWp().cacheInMemory(false) .cacheOnDisk(false).build(); } imageLoader.displayImage(imagePath, imageView, options_none, listener); }
public void loadImages(List<String> urls, DisplayImageOptions options, ImageLoadingListener imageLoadingListener) { if (urls == null || urls.size() == 0) { return; } bannerViewAdapter = new ImageAdapter(c, urls, options, imageLoadingListener); bannerViewAdapter.enableInfiniteMarquee(enableInfiniteMarquee); setAdapter(bannerViewAdapter); bannerViewAdapter.notifyDataSetChanged(); if (enableInfiniteMarquee) { jump2MidOffset(); } }
ImageAdapter(Context context, List<String> images, DisplayImageOptions options, ImageLoadingListener imageLoadingListener) { this.context = context; this.images = images; this.imageLoadingListener = imageLoadingListener; if (options != null) { this.options = options; } }
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; }