1

I m using Fedor's lazy Loader Adapter for showing images on a list view.

I want to pass the image(already downloaded) of the row which is clicked to new activity. I dont want to re download the image again. How can this be done ?

Ref : Lazy load of images in ListView

Community
  • 1
  • 1
ZealDeveloper
  • 783
  • 5
  • 21

1 Answers1

3

Fedor's Code (from what i've read) uses a File Cache aswell as a Memory Cache to Cache the downloaded files...

So Simply use

FileCache fileCache = new FileCache(context);
File bmp = fileCache.getFile(url);
//convert the File object to a Bitmap object using BitmapFactory (see decodeFile() method in ImageLoader)

and

MemoryCache memCache = new MemoryCache(context);
Bitmap bmp = memCache.get(url)

Note : If both return null, then you'll have to download it again.

st0le
  • 33,375
  • 8
  • 89
  • 89