【发布时间】:2016-11-15 07:29:37
【问题描述】:
Android WebView 不接受像这样为表格指定宽度/高度的 html:
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
</head>
<body>
<table width='100%' height='100%'>
<tr>
<td>
This is column 1
</td>
<td>
This is column 2
</td>
</tr>
</table>
</body>
</html>
在我的 PC 浏览器上完美运行。 WebView设置有layout_width="match_parent"和layout_height="wrap_content",数据加载使用:
webView.loadData(data, "text/html; charset=utf-8", "UTF-8");
【问题讨论】:
标签: android webview html-table android-webview