Is it possible to load a URL in a WebView and resize it to fit the screen? I mean I want to make the WebPage small so that the user doesn't need to scroll. Is this possible?
Is it possible to load a URL in a WebView and resize it to fit the screen? I mean I want to make the WebPage small so that the user doesn't need to scroll. Is this possible?
Have you tried just calling WebView.zoomOut() repeatedly until it returns false?
Also, I would note that this technique you want to use really relies on the web page being quite short. If the page is long and you zoom out to fit it entirely on screen, the user is going to need very good eye sight! ;)
As mentioned, zooming out too much is not something the user would like cause it'll reduce the legibility of the content.
I would suggest trying to set the zoom controls, however, I don't know if it'll work in 2.1.
webview.getSettings().setBuiltInZoomControls(true);
Hope this solves the problem as you now are giving user the control to change the zoom level.
I got this to work in a dialog using WRAP_CONTENT for both dimensions of the WebView, unfortunately when the web page becomes too large the webview pushes all my other widgets off the screen.
Android's layout system is pretty damn unintuitive!