所以在Android中,我想证明文字的合理性,所以我决定使用Webview.It工作正常,但唯一的问题是我的应用程序的背景不是白色的。所以每当我看到文字时,它总是有一个白色的背景。那么我可以添加一个body标签来使它能够改变背景颜色吗?需要Android字符串HTML帮助
String text = "<html><body style=\"text-align:justify\"> %s </body> </Html> ";
// I want to include a body tag above which will make the background this color = #e6e6e6
String data = "My Text";
WebView webView = (WebView) findViewById(R.id.WebView);
webView.loadData(String.format(text, data), "text/html", "utf-8");