I've read in a few posts that there was an bug in the how the Gallery
widget recycles views, that it was targeted for Eclair, but it looks
like it's still an issue.  I'm trying to use an extended Gallery (all
I do is override getChildStaticTransformation).  The Gallery items are
all simple custom views that simply draw a FastBitmapDrawable, the
images are pre-scaled, very lean and very basic.  All items are
280x320 jpg's, so not huge individually.

As I scroll through the gallery, I get to the same point each time and
when I call BitmapFactory.decodeFlie(path) I get the "bitmap size
exceeds VM budget" error.  I've offset the start point in the list and
it's not a specific image causing the issue, it's when I've decoded a
certain number of images from disk.  The other posts indicate that
it's cumulative; multiple bitmaps are being held in memory instead of
being recycled, and I assumed this was because the Gallery views
aren't being recycled properly and hanging on to their bitmaps.  I've
tried paging the image set to 10-20 images at a time, this works but
after a few pages I get the same exception.

Is there any workaround for this?  Even if it's addressed in an
update, it's not really viable to wait since all phones aren't going
to just instantly upgrade once an upgrade is released (judging by how
slowly 2.0/2.1 is rolling out).  Without a fix or workaround, the
Gallery seems pretty much useless for images (unless there's only a
few).

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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to