【问题标题】:Android webview <table width='100%'> issueAndroid webview <table width='100%'> 问题
【发布时间】: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


    【解决方案1】:

    已解决,需要替换为width='100%25'。

    【讨论】:

      猜你喜欢
      • 2012-05-05
      • 2019-05-16
      • 2015-06-25
      • 1970-01-01
      • 1970-01-01
      • 2011-09-24
      • 2022-08-14
      • 2013-12-31
      • 2017-12-18
      相关资源
      最近更新 更多