Junaid
Junaid

Reputation: 1179

Loading Large Images on WebView Causing Application Crash

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 ...... :)

Upvotes: 2

Views: 2087

Answers (1)

Yashwanth Kumar
Yashwanth Kumar

Reputation: 29121

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

Upvotes: 1

Related Questions