Code example for WebSettings

Methods: setDefaultFixedFontSizesetDefaultFontSizesetJavaScriptEnabled

0
 
		wv.setWebChromeClient(new WebChromeClient());
		wv.setBackgroundColor(Color.TRANSPARENT); // make the bg transparent
		 
		WebSettings settings = wv.getSettings();
		settings.setDefaultFontSize(webViewFontSizePoints);
		settings.setDefaultFixedFontSize(webViewFontSizePoints);
		settings.setJavaScriptEnabled(true);
		 
		wv.loadDataWithBaseURL("", contentBuffer.toString(), "text/html", "utf-8", null);
	} 
	/* 
	public static void formatWebView(Activity c, WebView wv, String contentString, int textColor) { 
		if(contentString == null) { 
			contentString = "<span></span>"; 
		} 
 
		TextView tv = new TextView(c); 
		DisplayMetrics metrics = new DisplayMetrics(); 
		c.getWindowManager().getDefaultDisplay().getMetrics(metrics); 
Contextual code suggestions in your IDE  Get Codota for Java