0
 
	@Override 
	public void setWebView(WebView web, DisplayMetrics metrics) {
		log.debug("setWebView()...");
		WebSettings settings = web.getSettings();
		settings.setCacheMode(WebSettings.LOAD_NO_CACHE); // If set this,
															// webview's back 
															// operation will 
															// bad. 
		settings.setJavaScriptEnabled(true);
		settings.setJavaScriptCanOpenWindowsAutomatically(false);
		settings.setSaveFormData(true);
		settings.setSavePassword(true);
		settings.setBuiltInZoomControls(true);
		// Some site check UA, if use custom, site will show bad, so comment 
		// this 
		// If you want replace default Usage-Agent field, use this. 
		// settings.setUserAgentString("Gorilla/Android HWAndroid/0.1"); 
		settings.setAllowFileAccess(true);
		settings.setNeedInitialFocus(false);
		settings.setRenderPriority(WebSettings.RenderPriority.HIGH);
		web.setHorizontalScrollBarEnabled(false);
		float density = metrics.density;
		int ll = (int) (density * 10);
		web.setInitialScale(ll);
 
Stop searching for code, let great code find you!  Add Codota to your java IDE