Odoo 10 POS Android Webview无法正常显示

问题描述 投票:-4回答:2

我创建了一个我的POS的Webview,但它显示如下:

我怎样才能做出响应?

css html5 css3 openerp
2个回答
1
投票
mWebView = (WebView) findViewById(R.id.activity_main_webview);
WebSettings webSettings = mWebView.getSettings();
mWebView.setInitialScale(1);
webSettings.setDomStorageEnabled(true);
mWebView.getSettings().setLoadWithOverviewMode(true);
mWebView.getSettings().setUseWideViewPort(true);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setAllowFileAccess(true);
mWebView.getSettings().setAllowContentAccess(true);
mWebView.setScrollbarFadingEnabled(false);

-1
投票

<!DOCTYPE html>
<html>
<title>W3.CSS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<body>

<div class="w3-container">
  <h2>The w3-mobile Class</h2>
  <p>The <strong>w3-mobile</strong> class adds mobile-first responsivenss to any element.</p>
  <p>It adds display:block and width:100% to an element on screens that are less than 600px wide.</p>

  <p>Resize the browser window to see the effect:</p>
  <button class="w3-button w3-black w3-mobile">Home</button>
  <button class="w3-button w3-black w3-mobile">Link 1</button>
  <button class="w3-button w3-black w3-mobile">Link 2</button>
  <button class="w3-button w3-black w3-mobile">Link 3</button>
</div>

</body>
</html>

这段代码可能会解决您的问题

© www.soinside.com 2019 - 2024. All rights reserved.