Search code examples
androidweb-servicesandroid-ksoap2

How can View image using web services with Ksoap2 in Android in ListView


I have created Application to get list of files and folders from web services and when get into the files like .jpg and .jpeg how can I get or View that image onClick that image item


Solution

  • There are many ways to load the image from the URL. Efficient way to load the images would be doing it in the background thread as if you try to load the images in UI thread then the UI thread will hang and In Android OS above 4.0 it will crash with NetworkOnMainTHread Excpetion.There are many lazy laoder approaches You can try any one of them:

    1.Universal ImageLoader: https://github.com/nostra13/Android-Universal-Image-Loader

    2.Fedor's Lazy loader: https://github.com/thest1/LazyList

    3.http://android-developers.blogspot.in/2010/07/multithreading-for-performance.html