2

In my application i m using a custom gallery where i used WebView to show images. I did so that i can use the zooming and scrolling property of WebView to zoom and scroll the gallery images ( in zoom in mode ). Now , The images i m loading are of size 1300x752 pixel. Everything works fine for sometimes but after that the application crashes / closes automatically which is happening due to memory shortage. So the question is how to manage memory so that the application will not automatically close / crash when using webview to load many large images. Please , help me on the issue by suggesting some solution / sample code / example. Thanks in advance ...... :)

Junaid
  • 1,179
  • 2
  • 18
  • 35

1 Answers1

1

You have to break in to samples while loading the image, there is already a question and a good answer for it, have a look at this page , this might help you.

Strange out of memory issue while loading an image to a Bitmap object

Community
  • 1
  • 1
Yashwanth Kumar
  • 28,931
  • 15
  • 65
  • 69