2011-06-01 126 views

回答

54

您应该查看WebView文档here

之间的信息还有其他大位,你会发现:

// OR, you can also load from an HTML string: 
String summary = "<html><body>You scored <b>192</b> points.</body></html>"; 
webview.loadData(summary, "text/html; charset=utf-8", "utf-8"); 
// ... although note that there are restrictions on what this HTML can do. 
// See the JavaDocs for loadData() and loadDataWithBaseURL() for more info. 

非常接近页面的顶部。

2

WebView.loadData可以传递一个直的HTML字符串。我使用在我的应用程序中从头开始创建的“页面”,该页面仅使用HTML格式编排

相关问题