0

My app will use DataDroid for REST client queries. Some ListViews in the app will display data with profile pictures, and these pictures are not downloaded with REST / as JSON. They are direct binary HTTP downloads. The only thing that is REST queried from the server and stored with reference to the pictures, is each picture's download URL.

For proper caching, the images are downloaded in a LRU caching mechanism with layers of disk caching and memory caching.

I'm thinking this picture loading/caching could still go via DataDroid's RequestService and Operation etc.

My question is: what would be a good way to do this in combination with DataDroid?

Besides this question, the following link gave me some ideas on how asynchronous loading and displaying of images could be done nicely: (not perfect, but useful ideas)

Android ListViews with Dynamic Data by Dan Maharry

Kay Zed
  • 1,304
  • 2
  • 21
  • 31
  • Have you looked into a library like Picasso? – Nathan Walters Jan 07 '14 at 18:25
  • @Nathan Walters, thanks, I'm looking into it. Some other ones mentioned here http://stackoverflow.com/a/18712118/344541 and there's the method of setUseCaches(true) on URLConnection. You can add your suggestion of Picasso as an answer. – Kay Zed Jan 08 '14 at 17:32
  • [Caching Bitmaps](http://developer.android.com/training/displaying-bitmaps/cache-bitmap.html) on developer.android.com. Or [ImageLoader by Antoine Merle](http://java.dzone.com/articles/android-listview-optimizations-0). Simple caching implementations. I find good stuff about Picasso, though. – Kay Zed Jan 08 '14 at 17:44
  • [On using setUseCaches(true)](http://stackoverflow.com/a/3893959/344541). Google setUseCaches though. Some advise against using it. – Kay Zed Jan 09 '14 at 06:49

1 Answers1

1

You may want to look into the library Picasso. It offers automatic caching and support for view recycling in adapters. It also had support for image transformations and placeholder views, such as for loading or errors. I haven't used it but I've heard very positive things about it. I would check it out, it seems to do what you want.

Nathan Walters
  • 4,116
  • 4
  • 23
  • 37