开发者

android out of memeory exception for multiple image views

开发者 https://www.devze.com 2023-02-17 02:41 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消