Tell the WebView to use the wide viewport and loads a page with overview mode. - Android android.webkit

Android examples for android.webkit:WebView

Description

Tell the WebView to use the wide viewport and loads a page with overview mode.

Demo Code

import android.app.Activity;
import android.util.Log;
import android.view.Display;
import android.webkit.WebSettings;
import android.webkit.WebView;

public class Main{

    /**/*from  www  .jav  a  2s  .  co m*/
     * Tell the WebView to use the wide viewport and loads a page with overview mode.
     * @param webview
     */
    public static final void fitScreenWidth(WebView webview) {
        WebSettings ws = webview.getSettings();
        ws.setUseWideViewPort(true);
        ws.setLoadWithOverviewMode(true);
    }

}

Related Tutorials