webview android相关设置

webview how to fit the webpage to the device screen size:

mWebView.getSettings().setLoadWithOverviewMode(true);
mWebView.getSettings().setUseWideViewPort(true);

//use BuiltInZoomControls & can zoom
mWebView.getSettings().setBuiltInZoomControls(true);
 mWebView.getSettings().setSupportZoom(true);

//bollow code from WebView.java
WebSettings settings = getSettings();
                        mInZoomOverview = settings.getUseWideViewPort() &&
                                settings.getLoadWithOverviewMode();
so, need add setLoadWithOverviewMode & setUseWideViewPort setting.

 

你可能感兴趣的:(android)