I'm trying to embed a HTML5 page into my application.
The content is greater than device, so I'm zooming it with:
web.setInitialScale((int) (728 / 600 * 100)); //728 is the height of the page, 600 of the device
This way the screen is in the correct size, but the content is too small, and I need to have zoom control on it. I tried the supportZoom(true) of the WebView, the zoom IN is correctly, but when zooming out, this doesn't reach my initial scale.
Try this:
web = (WebView) findViewById(R.id.webview);
web.getSettings().setBuiltInZoomControls(true);
web.getSettings().setSupportZoom(true);
web.getSettings().setUseWideViewPort(true);
web.getSettings().setLoadWithOverviewMode(true);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With