Android Glide: Show a blurred image before loading actual image

Image result for Android Glide
Hello,

1. Load MainImage (Large Image) before than Load Thumbnail,


How to manage this,



RequestBuilder thumbnailRequest = Glide
                .with(context)
                .load(<HERE YOUR THUMB URL>); 
Glide.with(context).load(<HERE MAIN URL>)
                .thumbnail(thumbnailRequest)
                .apply(new RequestOptions().placeholder(R.mipmap.car_placeholder))
                .listener(new RequestListener() {
                    @Override
                    public boolean onLoadFailed(@Nullable GlideException e, Object model, Target target, boolean isFirstResource) {
                        //  holder.pb_loading.setVisibility(View.GONE);
                        return false;
                    }

                    @Override
                    public boolean onResourceReady(Drawable resource, Object model, Target target, DataSource dataSource, boolean isFirstResource) {
                        // holder.pb_loading.setVisibility(View.GONE);
                        return false;
                    }
                })
               .into(holder.imageView);

Contributer

Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard. Google

0 comments:

Hot-product

Best Watch Store

Popular Posts

Contact Form

Name

Email *

Message *