I'm trying to use a WebView for displaying a big image with the built-in multitouch and trying to avoid memory crashes.
I set the webView this way:
setInitialScale(20);
WebSettings settings = getSettings();
settings.setJavaScriptEnabled(true);
settings.setUseWideViewPort(true);
settings.setLoadWithOverviewMode(true);
settings.setSupportZoom(true);
settings.setBuiltInZoomControls(true);
And then load the following code:
<head>
<meta
name="viewport"
content="width=device-width, user-scalable=yes"
/>
</head>
<body
style="margin: 0; padding: 0">
<img
alt="image"
src="THE_SRC_GOES_HERE"
id="theImage"
>
</body>
The problem is that if it loads a medium image (1600x1200 for example) it works nice and the image fits the screen width.
But if the image is bigger 7300x5200 in my example, it appears like zoomed in and with the zoom out disabled.
If you want to test the images urls are:
NOTE: I'm not the owner of that images and I'm only using it for testing