for the 2d problem, a list adapter works thus.

for the 1t problem, yes, exactly, if you are using correct list
adapter, after first initialization view object is repeat, reference
to first bitmap will be reassigned. Thats why GC deallocate first
bitmap, has no reference to that.


On 17 Лис, 15:50, Paolo <brand...@gmail.com> wrote:
> Hi there!
> I have to manage several Bitmap in a ListView where each row is
> composed by one thumbnail and one textview.
> This ListView can be very long, over 500 rows...
>
> There are two problems I have to solve:
>
> 1) it is better if I cache all the bitmaps, maybe using SoftReferences
> in a HashMap. I've tried this way, but I noticed a strange behavior
> with the SoftReferences. It seems that the GC clean them too fast.
> Why?
>
> 2) In order to implement the cache correctly I'd also like to
> understand which is the best practice you suggest me to realize a
> "image lazy loading". For example... I'm thinking to load all the data
> for first and then to load only the thumbnails, but only those really
> visible on the device screen at the and of the scroll action.
>
> Thanks in advance.
>
> Paolo

-- 
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