【发布时间】:2011-09-06 13:37:37
【问题描述】:
有没有一种方法可以编辑内容以通过 java 添加或从头开始创建?我找不到任何例子。
【问题讨论】:
标签: android
有没有一种方法可以编辑内容以通过 java 添加或从头开始创建?我找不到任何例子。
【问题讨论】:
标签: android
WebView.loadData 可以直接传递 HTML 字符串。我在我的应用程序中使用从头开始创建的“页面”,它只是用 HTML 格式化
【讨论】:
您应该查看 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.
非常接近页面顶部。
【讨论】: