I have successfully implemented lazy loading from a list of images and list items in an Android list. I am using Android 4.0 and Java 7.
The following algorithm is:
List data (including image URLs) is downloaded from the Internet as the user scrolls through the list.
When the scroll state is idle, list images are loaded.
In the background stream, the images are first checked in the cache. If they are not present in the cache, they are loaded and stored in the cache.
Ultimately, the image is set to view images in the list, and the adapter is notified.
The only problem is I donβt understand when to process bitmap images. I tried using bitmap.recyle () in many places, but got the following error:
java.lang.IllegalArgumentException: Unable to draw recycled raster map
It is not possible to add this extensive code here. There are also some privacy issues. Can someone please help me about this?
EDIT
The size of my application is increasing from 727 KB (at the time of installation) to 14 MB. After I reworked my bitmaps, in the getView () of the adapter, I get " cannot generate texture from the bitmap . " Can anyone suggest how to get rid of it?
source share