views:

38

answers:

1

I am using Mark Murphy's ThumbnailAdapter in a project to cache and display images from the web in a list view. It works well, except that it caches to internal memory. I can't figure out how to modify it to cache to external memory.

Any advice?

cwac-thumbnail: http://github.com/commonsguy/cwac-thumbnail

+1  A: 

While the ThumbnailAdapter is a nice interface, the caching and stuff underneath it is a big steaming pile of...rather unimpressive code. It's on my list of things to rewrite, someday.

That being said, you supply the root to the cache via the constructor to the SimpleWebImageCache, so you should be able to use a path on the SD card for that. You give the SimpleWebImageCache to the ThumbnailAdapter via the ThumbnailAdapter constructor.

CommonsWare
Ah. I see. Any recommendations for a caching mechanism that is less steamy? I was pretty happy with Fedor's ImageLoader from his LazyList demo, but I get OOM errors.
jonfhancock
@jonfhancock: Off the top of my head, no. I haven't gone looking for a caching solution in over a year. BTW, official support for these CWAC components is over at the `cw-android` Google Group: http://groups.google.com/group/cw-android I might miss a question here on SO just due to volume of traffic.
CommonsWare
Oh great! I didn't know that was there.
jonfhancock