Code example for WebSettings

Methods: setBuiltInZoomControls, setDatabaseEnabled, setDefaultFixedFontSize, setDefaultFontSize, setDefaultZoom, setDomStorageEnabled, setGeolocationEnabled, setJavaScriptCanOpenWindowsAutomatically, setJavaScriptEnabled, setLayoutAlgorithm

0
    view.setFocusable(true);
    view.setFocusableInTouchMode(true);
 
    // Webview settings 
    WebSettings settings = view.getSettings();
    settings.setJavaScriptCanOpenWindowsAutomatically(true);
    settings.setSupportMultipleWindows(true);
    settings.setBuiltInZoomControls(true);
    settings.setJavaScriptEnabled(true);
    /*settings.setAppCacheEnabled(true); 
    settings.setAppCacheMaxSize(10*1024*1024); 
    settings.setAppCachePath("");*/ 
    settings.setDatabaseEnabled(true);
    settings.setDomStorageEnabled(true);
    settings.setGeolocationEnabled(true);
    settings.setSaveFormData(true);
    settings.setRenderPriority(WebSettings.RenderPriority.HIGH);
 
    // Same as the browser settings 
    settings.setLoadWithOverviewMode(true);
    settings.setLayoutAlgorithm(LayoutAlgorithm.NARROW_COLUMNS);
    settings.setDefaultZoom(ZoomDensity.valueOf("MEDIUM"));
    settings.setUseWideViewPort(true);
    settings.setMinimumFontSize(1);
    settings.setMinimumLogicalFontSize(1);
    settings.setDefaultFontSize(16);
    settings.setDefaultFixedFontSize(13);
     
    view.enablePlatformNotifications();
    view.setNetworkAvailable(true);
  } 
}