Hi all I am developing app with two dynamic layouts and image views.when i am loading many images in image views, the first activity started well.But when i am open second activity i am getting out of memory exception .
S开发者_JAVA技巧o please give me solution
Thanks in advance.
Are you loading lots of images as bitmaps in your code? They can become quite large, and you've only got the 16mb of heapspace to play with.
If you are using some sort of createBitmap function from bitmapFactory, check if you can set the sample size (inSampleSize I think) in the options.
精彩评论