Java Code Examples for com.nostra13.universalimageloader.core.listener.SimpleImageLoadingListener

The following examples show how to use com.nostra13.universalimageloader.core.listener.SimpleImageLoadingListener. These examples are extracted from open source projects. 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 Project: ForPDA   Source File: PanelItemAdapter.java    License: GNU General Public License v3.0 6 votes vote down vote up
@Override
public void onBindViewHolder(final ViewHolder holder, final int position) {
    ButtonData item = items.get(position);
    if (type == TYPE_ASSET) {
        ImageLoader.getInstance().loadImage(urlsToAssets.get(position), new SimpleImageLoadingListener() {
            @Override
            public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
                holder.button.setImageBitmap(loadedImage);
            }
        });
    } else if (type == TYPE_DRAWABLE) {
        holder.button.setImageDrawable(App.getVecDrawable(holder.itemView.getContext(), item.getIconRes()));
        //holder.button.setColorFilter(colorFilter);
    }
    if (item.getTitle() == null) {
        holder.title.setVisibility(View.GONE);
        holder.itemView.setContentDescription(item.getText());
    } else {
        holder.itemView.setContentDescription(item.getTitle());
        holder.title.setText(item.getTitle());
        holder.title.setVisibility(View.VISIBLE);
    }
}
 
Example 2
Source Project: mobile-manager-tool   Source File: MetroMapViewActivity.java    License: MIT License 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.assistant_metro_activity_map_view);

    String cityName =  getIntent().getStringExtra("name");
    final String imageUrl = getIntent().getStringExtra("imageUrl");

    Log.d(">>>imageUrl", imageUrl);
    UIHelp.setHeaderMenuView(this, cityName + "地铁线路图");

    imageView = (GestureImageView) findViewById(R.id.imageView);

    ImageLoadUtil.getInstance().loadImage(imageUrl, new SimpleImageLoadingListener(){
        @Override
        public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
            imageView.setImageBitmap(loadedImage);
        }
    });
}
 
Example 3
Source Project: ChipHellClient   Source File: UserView.java    License: Apache License 2.0 6 votes vote down vote up
public void bindValue(User user) {
    ImageLoader.getInstance().displayImage(user.getAvatarUrl(), imageViewAvatar, Constants.avatarDisplayOption,
            new SimpleImageLoadingListener() {
                @Override
                public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
                    super.onLoadingComplete(imageUri, view, loadedImage);
                    /*if (loadedImage != null) {
                        Bitmap bg = BitmapUtil.fastblur(loadedImage, 30);
                        mainFrame.setBackgroundDrawable(new BitmapDrawable(bg));
                    } else {
                        mainFrame.setBackgroundResource(R.drawable.card_bg_normal);
                    }*/
                }
            });
    textViewName.setText(user.getName());
    textViewInfo.setText(Html.fromHtml(user.getInfo()));
}
 
Example 4
Source Project: talk-android   Source File: ImageReviewActivity.java    License: MIT License 5 votes vote down vote up
private void displayImage(String url, ImageView imageView) {
    MainApp.IMAGE_LOADER.displayImage(url, imageView, ImageLoaderConfig.EMPTY_OPTIONS,
            new SimpleImageLoadingListener() {
                @Override
                public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
                    attacher.update();
                }
            });
}
 
Example 5
Source Project: Muzesto   Source File: ArtistDetailFragment.java    License: GNU General Public License v3.0 5 votes vote down vote up
private void setBlurredPlaceholder(LastfmArtist artist) {
    ImageLoader.getInstance().loadImage(artist.mArtwork.get(1).mUrl, new SimpleImageLoadingListener() {
        @Override
        public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
            if (getActivity() != null && !largeImageLoaded)
                new setBlurredAlbumArt().execute(loadedImage);

        }
    });
}
 
Example 6
@Override
protected void onPostExecute(String uri) {
    ImageLoader.getInstance().displayImage(uri, playlistImage,
            new DisplayImageOptions.Builder().cacheInMemory(true)
                    .showImageOnFail(R.drawable.ic_dribble)
                    .resetViewBeforeLoading(true)
                    .build(), new SimpleImageLoadingListener() {
                @Override
                public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
                }
            });
    songcount.setText(" " + String.valueOf(songCountInt) + " " + mContext.getString(R.string.songs));
}
 
Example 7
Source Project: ForPDA   Source File: AuthFragment.java    License: GNU General Public License v3.0 5 votes vote down vote up
private void onLoadForm(AuthForm authForm) {
    if (authForm.getBody() == null) return;
    this.authForm = authForm;
    captchaProgress.setVisibility(View.VISIBLE);
    captchaImage.setVisibility(View.GONE);
    ImageLoader.getInstance().displayImage(authForm.getCaptchaImageUrl(), captchaImage, new SimpleImageLoadingListener() {
        @Override
        public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
            captchaProgress.setVisibility(View.GONE);
            captchaImage.setVisibility(View.VISIBLE);
        }
    });
}
 
Example 8
Source Project: Slide   Source File: Image.java    License: GNU General Public License v3.0 5 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    ViewGroup rootView = (ViewGroup) inflater.inflate(
            R.layout.submission_imagecard, container, false);

    final SubsamplingScaleImageView image = (SubsamplingScaleImageView) rootView.findViewById(R.id.image);
    TextView title = (TextView) rootView.findViewById(R.id.title);
    TextView desc = (TextView) rootView.findViewById(R.id.desc);

    title.setVisibility(View.GONE);
    desc.setVisibility(View.GONE);


    ((Reddit) getContext().getApplicationContext()).getImageLoader()
            .loadImage(url,
                    new SimpleImageLoadingListener() {

                        @Override
                        public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
                            image.setImage(ImageSource.bitmap(loadedImage));
                        }
                    });


    return rootView;
}
 
Example 9
Source Project: Slide   Source File: ShareUtil.java    License: GNU General Public License v3.0 5 votes vote down vote up
public static void shareImage(final String finalUrl, final Context context) {
    ((Reddit) context.getApplicationContext()).getImageLoader()
            .loadImage(finalUrl, new SimpleImageLoadingListener() {
                @Override
                public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
                    shareImage(loadedImage, context);
                }
            });
}
 
Example 10
Source Project: candybar   Source File: ImageLoader.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * Sets a default loading listener for all display and loading tasks.
 */
public void setDefaultLoadingListener(ImageLoadingListener listener) {
    defaultListener = listener == null ? new SimpleImageLoadingListener() : listener;
}
 
Example 11
Source Project: ForPDA   Source File: ProfileFragment.java    License: GNU General Public License v3.0 4 votes vote down vote up
private void onProfileLoad(ProfileModel profile) {
    currentProfile = profile;
    if (currentProfile.getNick() == null) return;
    adapter.setProfile(currentProfile);
    adapter.notifyDataSetChanged();
    refreshToolbarMenuItems(true);
    ImageLoader.getInstance().loadImage(currentProfile.getAvatar(), new SimpleImageLoadingListener() {
        @Override
        public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
            //Нужен handler, иначе при повторном создании фрагмента неверно вычисляется высота вьюхи
            new Handler().post(() -> {
                if (!isAdded())
                    return;
                blur(loadedImage);
                Bitmap overlay = Bitmap.createBitmap(loadedImage.getWidth(), loadedImage.getHeight(), Bitmap.Config.RGB_565);
                overlay.eraseColor(Color.WHITE);
                Canvas canvas = new Canvas(overlay);
                canvas.drawBitmap(loadedImage, 0, 0, new Paint(Paint.FILTER_BITMAP_FLAG));
                AlphaAnimation animation = new AlphaAnimation(0, 1);
                animation.setDuration(500);
                animation.setFillAfter(true);
                avatar.setImageBitmap(overlay);
                avatar.startAnimation(animation);

                AlphaAnimation animation1 = new AlphaAnimation(1, 0);
                animation1.setDuration(500);
                animation1.setFillAfter(true);
                progressView.startAnimation(animation1);
                new Handler().postDelayed(() -> {
                    progressView.stopAnimation();
                    progressView.setVisibility(View.GONE);
                }, 500);
            });

        }
    });


    setTabTitle(String.format(getString(R.string.profile_with_Nick), currentProfile.getNick()));
    setTitle(currentProfile.getNick());
    nick.setText(currentProfile.getNick());
    group.setText(currentProfile.getGroup());
    if (currentProfile.getSign() != null) {
        sign.setText(currentProfile.getSign());
        sign.setVisibility(View.VISIBLE);
        sign.setMovementMethod(LinkMovementMethod.getInstance());
    }

    if (!currentProfile.getContacts().isEmpty()) {
        if (!Pattern.compile("showuser=".concat(Integer.toString(ClientHelper.getUserId()))).matcher(tab_url).find()) {
            writeMenuItem.setVisible(true);
        } else {
            writeMenuItem.setVisible(false);
        }
    }
}
 
Example 12
Source Project: BigApp_WordPress_Android   Source File: ImageLoader.java    License: Apache License 2.0 4 votes vote down vote up
/** Sets a default loading listener for all display and loading tasks. */
public void setDefaultLoadingListener(ImageLoadingListener listener) {
	defaultListener = listener == null ? new SimpleImageLoadingListener() : listener;
}
 
Example 13
Source Project: WliveTV   Source File: ImageLoader.java    License: Apache License 2.0 4 votes vote down vote up
/** Sets a default loading listener for all display and loading tasks. */
public void setDefaultLoadingListener(ImageLoadingListener listener) {
	defaultListener = listener == null ? new SimpleImageLoadingListener() : listener;
}
 
Example 14
Source Project: JianDanRxJava   Source File: PictureAdapter.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void onBindViewHolder(final PictureViewHolder holder, final int position) {

    final Picture picture = mPictures.get(position);
    String picUrl = picture.getPics()[0];

    if (picUrl.endsWith(".gif")) {
        holder.img_gif.setVisibility(View.VISIBLE);
        //非WIFI网络情况下,GIF图只加载缩略图,详情页才加载真实图片
        if (!isWifiConnected) {
            picUrl = picUrl.replace("mw600", "small").replace("mw1200", "small").replace
                    ("large", "small");
        }
    } else {
        holder.img_gif.setVisibility(View.GONE);
    }

    holder.progress.setProgress(0);
    holder.progress.setVisibility(View.VISIBLE);

    ImageLoadProxy.displayImageList(picUrl, holder.img, R.drawable.ic_loading_large, new
                    SimpleImageLoadingListener() {
                        @Override
                        public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
                            super.onLoadingComplete(imageUri, view, loadedImage);
                            holder.progress.setVisibility(View.GONE);
                        }
                    },
            (imageUri, view, current, total) -> holder.progress.setProgress((int) (current * 100f / total)));

    if (TextUtil.isNull(picture.getText_content().trim())) {
        holder.tv_content.setVisibility(View.GONE);
    } else {
        holder.tv_content.setVisibility(View.VISIBLE);
        holder.tv_content.setText(picture.getText_content().trim());
    }

    holder.img.setOnClickListener(v -> IntentHelper.toImageDetailActivity(mActivity, picture));

    holder.tv_author.setText(picture.getComment_author());
    holder.tv_time.setText(String2TimeUtil.dateString2GoodExperienceFormat(picture.getComment_date()));
    holder.tv_like.setText(picture.getVote_positive());
    holder.tv_comment_count.setText(picture.getComment_counts());

    //用于恢复默认的文字
    holder.tv_like.setTypeface(Typeface.DEFAULT);
    holder.tv_like.setTextColor(mActivity.getResources().getColor(
            secondary_text_default_material_light));
    holder.tv_support_des.setTextColor(mActivity.getResources().getColor(
            secondary_text_default_material_light));

    holder.tv_unlike.setText(picture.getVote_negative());
    holder.tv_unlike.setTypeface(Typeface.DEFAULT);
    holder.tv_unlike.setTextColor(mActivity.getResources().getColor(
            secondary_text_default_material_light));
    holder.tv_un_support_des.setTextColor(mActivity.getResources().getColor(
            secondary_text_default_material_light));

    holder.img_share.setOnClickListener(v -> new MaterialDialog.Builder(mActivity)
            .items(R.array.picture_dialog)
            .backgroundColor(mActivity.getResources().getColor(JDApplication.COLOR_OF_DIALOG))
            .contentColor(JDApplication.COLOR_OF_DIALOG_CONTENT)
            .itemsCallback((dialog, view, which, text) -> {

                switch (which) {
                    case 0:
                        ShareUtil.sharePicture(mActivity, picture
                                .getPics()[0]);
                        break;
                    case 1:
                        FileUtil.savePicture(picture
                                .getPics()[0], mSaveFileCallBack);
                        break;
                }
            })
            .show());

    holder.ll_comment.setOnClickListener(v -> {
        Intent intent = new Intent(mActivity, CommentListActivity.class);
        intent.putExtra(BaseActivity.DATA_THREAD_KEY, "comment-" + picture.getComment_ID());
        mActivity.startActivity(intent);
    });

    setAnimation(holder.card, position);

}
 
Example 15
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.two_activity);
        final ImageView test_img_two=(ImageView)this.findViewById(R.id.test_img_two);
//        ImageLoader.getInstance().loadImage(ImageDataUtils.ImagesUtils[3], new ImageLoadingListener() {
//            @Override
//            public void onLoadingStarted(String imageUri, View view) {
//                //图片开始加载的时候调用
//                Log.d("zttjiangqq","onLoadingStarted...");
//            }
//
//            @Override
//            public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
//                //图片加载失败调用
//                Log.d("zttjiangqq","onLoadingFailed...");
//            }
//
//            @Override
//            public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
//                //图片加载完成调用
//                Log.d("zttjiangqq","onLoadingComplete...");
//                test_img_two.setImageBitmap(loadedImage);
//            }
//
//            @Override
//            public void onLoadingCancelled(String imageUri, View view) {
//                //图片加载取消调用
//                Log.d("zttjiangqq","onLoadingCancelled...");
//            }
//        });
//        ImageLoader.getInstance().loadImage(ImageDataUtils.ImagesUtils[4],new SimpleImageLoadingListener(){
//            @Override
//            public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
//                super.onLoadingComplete(imageUri, view, loadedImage);
//                //图片加载完成时候调用
//                Log.d("zttjiangqq","onLoadingComplete...");
//                test_img_two.setImageBitmap(loadedImage);
//            }
//
//            @Override
//            public void onLoadingStarted(String imageUri, View view) {
//                super.onLoadingStarted(imageUri, view);
//                //图片开始加载的时候调用
//                Log.d("zttjiangqq", "onLoadingStarted...");
//            }
//        });
//        DisplayImageOptions options=new DisplayImageOptions.Builder()
//                .showImageOnLoading(R.drawable.ic_data_loading)
//                .showImageOnFail(R.drawable.ic_data_error)
//                .cacheInMemory(true)
//                .cacheOnDisk(true)
//                .build();
//        ImageLoader.getInstance().loadImage(ImageDataUtils.ImagesUtils[5],options,new SimpleImageLoadingListener(){
//            @Override
//            public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
//                super.onLoadingComplete(imageUri, view, loadedImage);
//                //图片加载完成时候调用
//                Log.d("zttjiangqq","onLoadingComplete...");
//                test_img_two.setImageBitmap(loadedImage);
//            }
//        });
        ImageSize size=new ImageSize(100,50);
        ImageLoader.getInstance().loadImage(ImageDataUtils.ImagesUtils[6],size,new SimpleImageLoadingListener(){
            @Override
            public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
                super.onLoadingComplete(imageUri, view, loadedImage);
                  //图片加载完成时候调用
                  Log.d("zttjiangqq","onLoadingComplete...");
                  test_img_two.setImageBitmap(loadedImage);
            }
        });
    }
 
Example 16
Source Project: okulus   Source File: NetworkFragment.java    License: Apache License 2.0 4 votes vote down vote up
private void loadImage(final ImageView imageView, final int position) {

            final String imageurl = (String) getItem(position);
            switch (getItemViewType(position)) {

                //Volley - ImageRequest
                case 0: {
                    final ImageRequest request = new ImageRequest(
                            imageurl,
                            new Response.Listener<Bitmap>() {
                                @Override
                                public void onResponse(Bitmap response) {
                                    imageView.setImageBitmap(response);
                                }
                            },
                            dpToPx(128),
                            dpToPx(96),
                            null,
                            new Response.ErrorListener() {
                                @Override
                                public void onErrorResponse(VolleyError error) {

                                }
                            }
                    );

                    mRequestQueue.add(request);
                    break;
                }

                //Volley - NetworkImageView - In this case, NetworkImageView has been modified to extend OkulusImageView
                case 1: {

                    final NetworkImageView networkImageView = (NetworkImageView) imageView;
                    networkImageView.setImageUrl(imageurl, mImageLoader);
                    break;
                }

                //Picasso
                case 2: {

                    Picasso.with(imageView.getContext())
                            .load(imageurl)
                            .resize(dpToPx(128), dpToPx(96))
                            .centerCrop()
                            .into(new Target() {
                                @Override
                                public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {
                                    imageView.setImageBitmap(bitmap);
                                }

                                @Override
                                public void onBitmapFailed(Drawable errorDrawable) {

                                }

                                @Override
                                public void onPrepareLoad(Drawable placeHolderDrawable) {

                                }
                            });
                    break;
                }

                //Glide
                case 3: {

                    Glide.with(imageView.getContext())
                            .load(imageurl)
                            .asBitmap()
                            //.override(dpToPx(128), dpToPx(96))
                            .centerCrop()
                            .into(new ViewTarget<ImageView, Bitmap>(imageView) {
                                @Override
                                public void onResourceReady(Bitmap resource, GlideAnimation<? super Bitmap> glideAnimation) {
                                    imageView.setImageBitmap(resource);
                                }
                            });
                    break;
                }

                // Universal Image Loader
                case 4: {

                    ImageSize targetSize = new ImageSize(dpToPx(96), dpToPx(128));
                    mUniversalImageLoader.loadImage(imageurl, targetSize, new SimpleImageLoadingListener() {

                        @Override
                        public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
                            imageView.setImageBitmap(loadedImage);
                        }
                    });
                    break;
                }

            }
        }
 
Example 17
Source Project: ChipHellClient   Source File: PicFargment.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected void onAfterViews() {
    Log.i(TAG, "onAfterViews: url "+mUrl);
    mPhotoViewAttacher = new PhotoViewAttacher(mImageView);
    ImageLoader.getInstance().displayImage(mUrl, mImageView, imageOptions, new SimpleImageLoadingListener() {
        final List<String> displayedImages = Collections.synchronizedList(new LinkedList<String>());

        @Override
        public void onLoadingComplete(String url, View view, Bitmap bitmap) {
            if (bitmap == null) return;

            if (url.endsWith(".gif") || url.endsWith(".GIF")) {
                File file = ImageLoader.getInstance().getDiscCache().get(url);
                try {
                    GifDrawable drawable = new GifDrawable(file);
                    mImageView.setImageDrawable(drawable);
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }

            boolean firstDisplay = !displayedImages.contains(url);
            if (firstDisplay) {
                FadeInBitmapDisplayer.animate(mImageView, 500);
                displayedImages.add(url);
            }

            mPhotoViewAttacher.update();
            mProgressBar.setVisibility(View.GONE);

            Palette p = Palette.from(bitmap).generate();
            //mainFrame.setBackgroundColor(p.getLightMutedColor(Color.BLACK));

            ColorDrawable background = (ColorDrawable) mainFrame.getBackground();
            ObjectAnimator animator = ObjectAnimator.ofInt(mainFrame, "backgroundColor", background.getColor(), p.getLightMutedColor(Color.BLACK));
            animator.setEvaluator(new ArgbEvaluator());
            animator.setDuration(500);
            animator.start();
        }
    });

    mPhotoViewAttacher.setOnPhotoTapListener(new OnPhotoTapListener() {

        @Override
        public void onPhotoTap(View arg0, float arg1, float arg2) {
            getActivity().finish();
        }
    });
}
 
Example 18
Source Project: JianDan_OkHttpWithVolley   Source File: ImageLoadProxy.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 图片详情页专用
 *
 * @param url
 * @param target
 * @param loadingListener
 */
public static void displayImage4Detail(String url, ImageView target, SimpleImageLoadingListener loadingListener) {
    imageLoader.displayImage(url, target, getOption4ExactlyType(), loadingListener);
}
 
Example 19
Source Project: JianDan_OkHttpWithVolley   Source File: ImageLoadProxy.java    License: 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 20
Source Project: JianDan_OkHttpWithVolley   Source File: ImageLoadProxy.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 当使用WebView加载大图的时候,使用本方法现下载到本地然后再加载
 *
 * @param url
 * @param loadingListener
 */
public static void loadImageFromLocalCache(String url, SimpleImageLoadingListener loadingListener) {
    imageLoader.loadImage(url, getOption4ExactlyType(), loadingListener);
}
 
Example 21
Source Project: JianDan   Source File: ImageLoadProxy.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 图片详情页专用
 *
 * @param url
 * @param target
 * @param loadingListener
 */
public static void displayImage4Detail(String url, ImageView target, SimpleImageLoadingListener loadingListener) {
    imageLoader.displayImage(url, target, getOption4ExactlyType(), loadingListener);
}
 
Example 22
Source Project: JianDan   Source File: ImageLoadProxy.java    License: 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 23
Source Project: JianDan   Source File: ImageLoadProxy.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 当使用WebView加载大图的时候,使用本方法现下载到本地然后再加载
 *
 * @param url
 * @param loadingListener
 */
public static void loadImageFromLocalCache(String url, SimpleImageLoadingListener loadingListener) {
    imageLoader.loadImage(url, getOption4ExactlyType(), loadingListener);
}
 
Example 24
Source Project: JianDanRxJava   Source File: ImageLoadProxy.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 图片详情页专用
 *
 * @param url
 * @param target
 * @param loadingListener
 */
public static void displayImage4Detail(String url, ImageView target, SimpleImageLoadingListener loadingListener) {
    imageLoader.displayImage(url, target, getOption4ExactlyType(), loadingListener);
}
 
Example 25
Source Project: JianDanRxJava   Source File: ImageLoadProxy.java    License: 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 26
Source Project: JianDanRxJava   Source File: ImageLoadProxy.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 当使用WebView加载大图的时候,使用本方法现下载到本地然后再加载
 *
 * @param url
 * @param loadingListener
 */
public static void loadImageFromLocalCache(String url, SimpleImageLoadingListener loadingListener) {
    imageLoader.loadImage(url, getOption4ExactlyType(), loadingListener);
}
 
Example 27
Source Project: JianDan_OkHttp   Source File: ImageLoadProxy.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 图片详情页专用
 *
 * @param url
 * @param target
 * @param loadingListener
 */
public static void displayImage4Detail(String url, ImageView target, SimpleImageLoadingListener loadingListener) {
    imageLoader.displayImage(url, target, getOption4ExactlyType(), loadingListener);
}
 
Example 28
Source Project: JianDan_OkHttp   Source File: ImageLoadProxy.java    License: 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 Project: JianDan_OkHttp   Source File: ImageLoadProxy.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * 当使用WebView加载大图的时候,使用本方法现下载到本地然后再加载
 *
 * @param url
 * @param loadingListener
 */
public static void loadImageFromLocalCache(String url, SimpleImageLoadingListener loadingListener) {
    imageLoader.loadImage(url, getOption4ExactlyType(), loadingListener);
}
 
Example 30
/**
 * 为所有图片显示和加载任务添加加载监听器
 * Sets a default loading listener for all display and loading tasks.
 */
public void setDefaultLoadingListener(ImageLoadingListener listener) {
	defaultListener = listener == null ? new SimpleImageLoadingListener() : listener;
}