views:

296

answers:

2

Yeap. I want to change my ** webview's background color and font size.** How i can for it?

A: 

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.

Martin
+1  A: 

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);

You may also want to enable javascript and create a simple WebClient to handle page loading

Hope it helps!

jagsaund
Thanks, I left one thing "font color".Please.....
zayar
I didn't see any thing regarding changing font color in the API documentation. I don't think it's possible.
jagsaund