android - Out of memory exception on inflating layouts -


i getting random out of memory exceptions in app caused inflate exceptions.

i have 7 fragment (difficulty) activities launch own activities via buttons. each fragment has scroll view 30 buttons (levels). have set can swipe across each fragment , fragment takes entire screen.

occasionally when swipe few times , select random button group of 30 crash. tries load activity , gives out of memory exception inflate exception on random line. line falls on imageview or imagebutton in xml file. activities load grid of imageviews , imagebuttons.

i not exception want fix. have looked @ many other out of memory exception questions although none have helped me. have done memory analyser test , shows nothing out of ordinary.

i believe imageviews , imagebuttons using memory, although ever have 1 activity open @ once.

it because of images loading. when load image , move around page , view image heap increases. continue process of viewing random images heap grows more until app crashes. it's stacking books on glass table. either move(cache) book(image) or glass(app) breaks. should use imageloader load images.

https://github.com/nostra13/android-universal-image-loader


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -