1

I have an ASync task that D/L the images for the list view. Have the listview and the listview adapter implementation working fine.

My question is: After D/L the images from the web... 1. Should I save it into a temporary directory and load it from there? OR 2. Should I keep it in memory? But in this case might consume lots of memory since the list size can be big. 3. If I have an image that was U/L before to the server, I need to show it in the listview as a small image (sample?). Should I jsut put the image in the imageview? Should I process the image and scale it?

Yoav

Yoav
  • 635
  • 2
  • 11
  • 29

1 Answers1

1

I would keep the images in memory in a WeakReference. This means that the images will be released if the OS runs low on memory. In addition, you could save them to the SD card, so that when the images have to be reloaded, they will appear faster. You can check this thread Lazy load of images in ListView for some more hints.

Scaling the images is highly recommended for performance.

Community
  • 1
  • 1
Ben Ruijl
  • 4,973
  • 3
  • 31
  • 44