Search code examples
androidandroid-gallery

Image Gallery and Retrieving image from server


I am making a gallery for my application in which the images are on the serve. There are total of 4 images in my database. What i want is to retrieve those images and show them on the gallery.

I came across many examples from "SO" and http://w2davids.wordpress.com/android-3-0-%E2%80%93-photo-gallery-example/ which takes images from drawables.

The Confusion is when i retrieve the images from the database should i directly show them in the gallery or first save the images on the sd-card and then display them in the gallery. Which is the better and efficient option i can use.

Also if someone could help me out in showing the images directly from the network rather than drawables.

I would be glad if someone could help me out of this. Thank You!


Solution

  • I will suggest you to take a look at good library Universal Image Loader. This library have following features.

    • Multithread image loading
    • Possibility of wide tuning ImageLoader's configuration (thread executors, downlaoder, decoder, memory and disc cache, display image options, and others)
    • Possibility of image caching in memory and/or on device's file sysytem (or SD card)
    • Possibility to "listen" loading process
    • Possibility to customize every display image call with separated options
    • Widget support

    enter image description here