I want to change my
WebView‘s background color and font size.
Assuming that you have defined your webview in an XML layout resource you can do the following:
WebView myWebView = (WebView) findViewById(R.id.myWebView); myWebView.setBackgroundColor(Color.parseColor("#000000")); myWebView.getSettings.setDefaultFontSize(10);
Hope it helps!
I would think you can’t – unless you control the html data displayed.
The font and background are controlled by the html data feed to the Webview and not the Webview itself.