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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.