/** * Adds display image task to execution pool. Image will be set to ImageAware when it's turn. <br/> * Default {@linkplain DisplayImageOptions display image options} from {@linkplain ImageLoaderConfiguration * configuration} will be used.<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 * @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) { displayImage(uri, imageAware, null, null, null); }
/** * Adds display image task to execution pool. Image will be set to ImageAware when it's turn.<br /> * Default {@linkplain DisplayImageOptions display image options} from {@linkplain ImageLoaderConfiguration * configuration} will be used.<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 listener {@linkplain ImageLoadingListener Listener} for image loading process. Listener fires events on * UI thread if this method is called on UI thread. * @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, ImageLoadingListener listener) { displayImage(uri, imageAware, null, listener, null); }
/** * 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. * @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) { displayImage(uri, imageAware, options, null, null); }
/** * 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. * @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) { displayImage(uri, imageView, options, listener, null); }
/** * 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. * @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) { displayImage(uri, imageAware, options, listener, null); }
public void displayImage(final String url, final ImageView view, final DisplayImageOptions options) { imageLoader.displayImage(url, view, options); }
@Override public View getView(int position, View convertView, ViewGroup parent) { ImageView imageView = (ImageView) convertView; if (imageView == null) { imageView = (ImageView) inflater.inflate(R.layout.item_gallery_image, parent, false); } ImageLoader.getInstance().displayImage(IMAGE_URLS[position], imageView, options); return imageView; } }
/** * Adds display image task to execution pool. Image will be set to ImageView when it's turn. <br/> * Default {@linkplain DisplayImageOptions display image options} from {@linkplain ImageLoaderConfiguration * configuration} will be used.<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 * @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, ImageSize targetImageSize) { displayImage(uri, new ImageViewAware(imageView), null, targetImageSize, null, null); }
/** * Adds display image task to execution pool. Image will be set to ImageView when it's turn. <br/> * Default {@linkplain DisplayImageOptions display image options} from {@linkplain ImageLoaderConfiguration * configuration} will be used.<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 * @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) { displayImage(uri, new ImageViewAware(imageView), null, null, null); }
/** * Adds display image task to execution pool. Image will be set to ImageView when it's turn.<br /> * Default {@linkplain DisplayImageOptions display image options} from {@linkplain ImageLoaderConfiguration * configuration} will be used.<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 listener {@linkplain ImageLoadingListener Listener} for image loading process. Listener fires events on * UI thread if this method is called on UI thread. * @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, ImageLoadingListener listener) { displayImage(uri, new ImageViewAware(imageView), null, listener, null); }
/** * 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. * @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) { displayImage(uri, new ImageViewAware(imageView), options, null, null); }
@Override public View getView(final int position, View convertView, ViewGroup parent) { View view = convertView; final ViewHolder holder; if (convertView == null) { view = inflater.inflate(R.layout.item_list_image, parent, false); holder = new ViewHolder(); holder.text = (TextView) view.findViewById(R.id.text); holder.image = (ImageView) view.findViewById(R.id.image); view.setTag(holder); } else { holder = (ViewHolder) view.getTag(); } holder.text.setText("Item " + (position + 1)); ImageLoader.getInstance().displayImage(IMAGE_URLS[position], holder.image, options, animateFirstListener); return view; } }
@Override public void onBindViewHolder(SelectChannelItemHolder holder, final int position) { SubscriptionEntity entry = subscriptions.get(position); holder.titleView.setText(entry.getName()); holder.view.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { clickedItem(position); } }); imageLoader.displayImage(entry.getAvatarUrl(), holder.thumbnailView, DISPLAY_IMAGE_OPTIONS); }
@Override public void displayImagePreview(Activity activity, String path, ImageView imageView, int width, int height) { ImageSize size = new ImageSize(width, height); com.nostra13.universalimageloader.core.ImageLoader.getInstance().displayImage(Uri.fromFile(new File(path)).toString(), imageView, size); }
@Override public void displayImage(Activity activity, String path, ImageView imageView, int width, int height) { ImageSize size = new ImageSize(width, height); com.nostra13.universalimageloader.core.ImageLoader.getInstance().displayImage(Uri.fromFile(new File(path)).toString(), imageView, size); }
@Override public void prepare(BaseDanmaku danmaku, boolean fromWorkerThread) { if (danmaku.isTimeOut()) { return; } MyImageWare imageWare = (MyImageWare) danmaku.tag; if (imageWare == null) { String avatar = avatars[danmaku.index % avatars.length]; imageWare = new MyImageWare(avatar, danmaku, mIconWidth, mIconWidth, mDanmakuView); danmaku.setTag(imageWare); } if (danmaku.text.toString().contains("textview")) { Log.e("DFM", "onAsyncLoadResource======>" + danmaku.tag + "url:" + imageWare.getImageUri()); } ImageLoader.getInstance().displayImage(imageWare.getImageUri(), imageWare); }
@Override public void onBindViewHolder(ItemHolder itemHolder, int i) { // setAnimation(itemHolder.itemView, i); Song localItem = arraylist.get(i); ImageLoader.getInstance().displayImage(TimberUtils.getAlbumArtUri(localItem.albumId).toString(), itemHolder.albumArt, new DisplayImageOptions.Builder().cacheInMemory(true) .showImageOnLoading(R.drawable.ic_empty_music2).resetViewBeforeLoading(true).build()); }
public void setDetailsToHeader() { String name = MusicPlayer.getTrackName(); String artist = MusicPlayer.getArtistName(); if (name != null && artist != null) { songtitle.setText(name); songartist.setText(artist); } ImageLoader.getInstance().displayImage(TimberUtils.getAlbumArtUri(MusicPlayer.getCurrentAlbumId()).toString(), albumart, new DisplayImageOptions.Builder().cacheInMemory(true) .showImageOnFail(R.drawable.ic_empty_music2) .resetViewBeforeLoading(true) .build()); }
private void loadBitmap(String uri) { ImageLoader.getInstance().displayImage(uri, blurFrame, new DisplayImageOptions.Builder().cacheInMemory(true) .showImageOnFail(R.drawable.ic_empty_music2) .resetViewBeforeLoading(true) .build()); }
@Override public void artistInfoSucess(LastfmArtist artist) { if (artist != null && itemHolder.artistImage != null) { ImageLoader.getInstance().displayImage(artist.mArtwork.get(1).mUrl, itemHolder.artistImage, new DisplayImageOptions.Builder().cacheInMemory(true) .cacheOnDisk(true) .showImageOnFail(R.drawable.ic_empty_music2) .resetViewBeforeLoading(true) .displayer(new FadeInBitmapDisplayer(400)) .build()); } }