Giant online image gallery - How do I avoid OutOfMemoryError?

Posted by Ben L. on Stack Overflow See other posts from Stack Overflow or by Ben L.
Published on 2010-05-22T18:44:04Z Indexed on 2010/05/22 18:50 UTC
Read the original article Hit count: 235

Filed under:

For anyone who's wondering, the gallery is http://www.spore.com/sporepedia.

My app uses the Spore API to get the 100 newest creations, then displays them in a GridView. The text data about the creations is easy to store, but the images present a problem.

As far as I know, I can either keep the images in a Hashtable or grab them every time they are viewed. Neither of these will work - the Hashtable quickly presents an OutOfMemoryError, and the constant reloading causes a lot of load on the server and a lot of lag on the client.

Is there a better way to store the images?

© Stack Overflow or respective owner

Related posts about android