Android Question CustomListview performance with a lot of images

m643

Member
Licensed User
Longtime User
Hi all,

I am using the custom listview of Erel and I'm liking this class a lot. But I'm getting more and more performance issues when I load more items with images into the listview. I'm loading now, everytime the user goes to the bottom, a block of 20 items with an small image.

I'm looking how I can use this in a efficient way. Is there for a example a way to load the image only when the screen is focussed and if not destroy the image so I can save memory?

Any tips are welcome
 

Informatix

Expert
Licensed User
Longtime User
Hi all,

I am using the custom listview of Erel and I'm liking this class a lot. But I'm getting more and more performance issues when I load more items with images into the listview. I'm loading now, everytime the user goes to the bottom, a block of 20 items with an small image.

I'm looking how I can use this in a efficient way. Is there for a example a way to load the image only when the screen is focussed and if not destroy the image so I can save memory?

Any tips are welcome
Doing this implies to rewrite the class. Your alternatives are the FlexibleTable class (but this class is more text-oriented) or my UltimateListView lib, which is a very good solution (no loading time, with an optimized memory management for images) but not free.
 
Upvote 0

m643

Member
Licensed User
Longtime User
This is not a memory issue. It is a performance issue. Destroying the images will not help.

How are you loading the images? Are you using LoadBitmapSample?

Before I got the "Downsampling image due to lack of memory" so I resolved that issue with "loadbitmapsample". But I still having the issue that when I scrolling in the list and images are added it scrolling not fluently. When I not using images It works perfect.

So I'm looking for how I can detect which images are currently visible on the screen so i can only load these.
 
Last edited:
Upvote 0
Top