在网页视图中安装HTML <div>到屏幕 - Android </div>

时间:2014-01-28 12:58:18

标签: android html webview

我的页面看起来像这样

<html>
<head>
</head>
<body>
<div class='canvas'>
 Some content here, table other divs and others
</div>
</html>

div.canvas {
margin: 0px auto;
padding: 0px;
width: 600px;
}

我需要在android webView中将“canvas”div放到屏幕上。不幸的是我无法在服务器上编辑页面。

是否有其他选项而不是下载html字符串,他们将其编辑为本地并在webView中显示?

1 个答案:

答案 0 :(得分:0)

使用css,你可以将高度设置为100%,问题是确保你的WebView也设置为fill_parent,它不能用于wrap_content设置

相关问题