Thanks Victor, for your answer, but the adapter alone doesn't solve my
problem. The softreference is cleared, by definition, when the system
needs memory, not when then objects looses all the references.
Thanks to Streets of Boston too, I haven't thounght about your
solution with LinkedHashMap, ov
Use a LinkedHashmap for a cache and implement the method
'removeEldestEntry(...)' appropriately to limit the cache-size.
If the LinkedHashmap cache contains your image, code the
'getView(...)' of your list-adapter to immediately assign the
(thumbnail) image to the image-view.
If the LinkedHashmap
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
3 matches
Mail list logo