It's an out of memory error. the thing is that the images are loaded using threads from a remote location. If I don't cache them, and scroll the list very fast few times up and down, such that multiple requests/threads, for the same list item, are generated at the same time, all the responses will arrive at once and generate a lot of (repeated) bitmaps.
My current solution is to cache them, and don't do a request again if the image hasn't loaded yet... works well, but it will cause problems if my list becomes very long, since the memory can't be freed by the system. At least ATM this is not an issue for me, since the images I have to fetch have a fixed (low) count and size. On Sunday, July 15, 2012 11:59:27 AM UTC+2, user123 wrote: > > What is the best way to handle a very long list view with bitmaps in a low > memory device? I'm getting crashes after I scroll a bit... I don't want to > loose image quality... I was thinking about loading only the number of > items which is possible for the available memory, but this is obviously a > bad solution. Do I have to recycle manually the bitmaps, in getView(), > according to the position...? Is this the way to handle this? > > Thanks in advance. > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

