我想改变我的的WebView
的背景颜色和字体大小。
I want to change my WebView
's background color and font size.
假设你定义了你的WebView中,你可以做以下的XML布局资源:
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);
您可能还需要启用javascript并创建一个简单的Web客户端来处理页面加载
You may also want to enable javascript and create a simple WebClient to handle page loading
希望它能帮助!
上一篇:如何使用自定义的日期选择器和Timepicker皮肤?自定义、如何使用、皮肤、日期
下一篇:如何布局变焦控制setBuiltInZoomControls(真)?变焦、布局、setBuiltInZoomControls