I have a requirement where I need to load thumbnails and a Text
in ListView
which gets set by the custom Adapter
. The Thumbnails shoul
I will suggest you using AQuery - (Android-Query) - a super simple UI manipulation framework for Android.
AQuery comes as a library, which you need to include in your build path.
In AQuery, you can download, display (with effects) and cache the image (both in memory and disk) with following lines:
AQuery aq = new AQuery(yourActivity.this);
boolean memCache = true;
boolean fileCache = true;
aq.id(R.id.image1).image("http://www.example.com/image.jpg", memCache, fileCache);
AQuery will handle all the data downloading processes, and will display images on your ImageView you've given. Once you load the image, it will be cached in the memory (or disk) according to the boolean parameters memCache
and fileCache
. The next time, it will load the image from the memory cache or file cache.
For more information and examples, you should visit the AQuery Project at http://code.google.com/p/android-query/
More code on Image Loading - http://code.google.com/p/android-query/wiki/ImageLoading