![](/img/trans.png)
[英]How to make html to fill full screen height on webview in android browser
[英]How to load html page by webview for full screen?
當我使用webview加載html代碼時,如果設備在android 5.0之上,則webview加載的頁面為全屏,而沒有其他設置,但是,如果設備在android 5.0以下,則頁面不能為全屏,為什么? 如何解決這個問題呢?
嘗試以下代碼
//get the id
WebView browser = (WebView) findViewById(R.id.webview);
//set the following params as well
browser.getSettings().setLoadWithOverviewMode(true);
browser.getSettings().setUseWideViewPort(true);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.