I have a view pager with four pages, and each page have a listView. Everything's ok so far, but when i scroll the list it kicks thousand times GC_EXTERNAL_ALLOC and it dicreases performans of my app. So i track allocations by DDMS by following Romain Guy's documentation and saw that's because of loading images to list items.
I save images and then check if there is that image as saved before, if there is, i use:
img.setImageDrawable(Drawable.createFromPath(imagePath));
When i get allocation tracks, it shows me that this line has allocated lots of memory while scrolling... I just wonder why? And if there is any affective way to load images to suggest me?
Any help would be appreciated.