Forcing A Webpage To Fit Into A Webview
I'm in need of two things: I need to display a webview that shows the entire webpage (horizontally), and automatically shrinks it to whatever width necessary to display the entire
Solution 1:
In order to have the WebView shrink the page to the width of the screen, use the following settings in your code.
WebViewwebView= (WebView)findViewById(R.id.webView);
webView.getSettings().setUseWideViewPort(true);
webView.getSettings().setLoadWithOverviewMode(true);
you can use:
int x = 0, y = THE_NUMBER_YOU_WANT;
view.scrollTo(x,y);
to scroll to any position on the webpage, determining how far you have to scroll down will be challenging though.
Post a Comment for "Forcing A Webpage To Fit Into A Webview"