0

How to load image from server in low quality using Volley to reduce image loading time like whatsapp doing circular images load with low quality and when tapped Image start load in High quality, I also want to first load image in Low quality from server so to reduce loading time and when user tapped on image it load in high quality how is it possible using volley NetworkImageView ? thanks in advance

code i was using to load image from Server :

     imgLoader.get(url, new ImageListener() {

                @Override
                public void onErrorResponse(VolleyError arg0) {

                    }

                @Override
                public void onResponse(ImageContainer bm, boolean arg1) {
                    productImagebitmap=bm.getBitmap();
                    smallImageView.setImageBitmap(productImagebitmap);
                }
            });
Kapil Rajput
  • 11,429
  • 9
  • 50
  • 65
  • You can achieve this by generating thumbnail of an image and download using volley.when user click on that then download an actual image. – Madhukar Hebbar Dec 14 '15 at 09:59

2 Answers2

0

I found similar question and solution for what ever you asked. I hope u may found solution here.

First One: Loading images Super-Fast like WhatsApp article Click here

Second One: Loading images from URL partially Click here

Community
  • 1
  • 1
Ravi Jaggarapu
  • 627
  • 3
  • 10
0

Finally I got the solution for my Question

To download image in desired quality (low/high/medium) we have to pass size as parameters in get method of imageloader imgLoader.get(String url, ImageListener imgListner, int height, int weidth);

Working code :

                     imgLoader.get(url, new ImageListener() {
                @Override
                public void onErrorResponse(VolleyError arg0) {

                }

                @Override
                public void onResponse(ImageContainer bm, boolean arg1) {
                    productImagebitmap=bm.getBitmap();
                    smallImageView.setImageBitmap(productImagebitmap);

                }
            },50,50); //from here i can manage loading quality of image.
Kapil Rajput
  • 11,429
  • 9
  • 50
  • 65