Android examples for User Interface:WebView Zoom
Sets whether the WebView loads pages in overview mode, that is, zooms out the content to fit on screen by width.
//package com.java2s; import android.webkit.WebSettings; import android.webkit.WebView; public class Main { /**/*ww w . ja v a 2s . c om*/ * Sets whether the WebView loads pages in overview mode, that is, * zooms out the content to fit on screen by width. * * @param webView The webView you wanna enable adapting screen size automatically * @return The WebSettings instance */ public static WebSettings adaptScreenSize(WebView webView) { WebSettings webViewSettings = webView.getSettings(); webViewSettings.setLoadWithOverviewMode(true); webViewSettings.setUseWideViewPort(true); return webViewSettings; } }