I have to show about 40 bitmaps in a Gridview. each image is around 500k and total size is around 15MB. I am getting OutOfMemoryError in my getView() of Adapter. (I'm reusing the convertView).
How can I get rid of this error?
I have to show about 40 bitmaps in a Gridview. each image is around 500k and total size is around 15MB. I am getting OutOfMemoryError in my getView() of Adapter. (I'm reusing the convertView).
How can I get rid of this error?
Your device do not support maintaining the 40bitmaps in memory. You should implement it loading only visibles imagenes.
If you don't know how to do it, you can use Android Universal Image Loader. This library will avoid outOfMemoryError and will simplify the load image task.