Reputation: 58
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
Upvotes: 1
Views: 484
Reputation: 2823
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
Upvotes: 1
Reputation: 2885
follow this one , it's may help you :
http://www.android-ever.com/2011/06/android-lazy-image-loader-example.html
Upvotes: 1