Question

I need a code for load images with ALL this options:

- High resolution images

- Pinch and double tap to zoom

- Load from URL

- ViewPager

Anyone know a code like this?

Was it helpful?

Solution

I recommend you to use this library https://github.com/nostra13/Android-Universal-Image-Loader

  1. High resolution images - yes it can load them
  2. Pinch and double tap to zoom - No. but you can download the image with library and than write small code which will zoom it. Like this: Android imageView Zoom-in and Zoom-Out
  3. Load from URL - yes it can do it quick and also will cash downloaded image.
  4. ViewPager - yes it can do it, you can find an example with ViewPager in Image Loader examples.

So 3 from 4, but zooming is too separate thing in order to be included to library which downloading images.

OTHER TIPS

I can help you for Image Loading from url as below:

I can recommend a different way that works like a charm: Android Query.

You can download that JAR file from here

AQuery androidAQuery = new AQuery(this);

As an example:

androidAQuery.id(YOUR IMAGEVIEW).image(YOUR IMAGE TO LOAD, true, true, getDeviceWidth(), ANY DEFAULT IMAGE YOU WANT TO SHOW);

It's very fast and accurate, and using this you can find many more features like animation when loading, getting a bitmap (if needed), etc.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top