title: How to make html to fill full screen height on webview in android browser
body: <p>I added a webview on a AppCompatActivity and want to make it to fill full screen. I have tried the method mentioned on this link(<a href="https://stackoverflow.com/questions/8681177/how-to-make-full-screen-in-android-4-0">How to make full screen in Android 4.0</a>) but it doesn't help.</p>
  
  <p>Below is the layout xml file.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  tools:context="com.lenovo.mds.mbgcompass.MainActivity"&gt;
  
  &lt;WebView
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:id="@+id/webView"
      /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Below is the MainActivity class:</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
          this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  
      webView = (WebView) findViewById(R.id.webView);
      setupWebView();
  }
  
  private void setupWebView(){
      webView.getSettings().setSupportZoom(true);
      webView.getSettings().setBuiltInZoomControls(false);
      webView.getSettings().setCacheMode(android.webkit.WebSettings.LOAD_NO_CACHE);
      webView.getSettings().setDefaultTextEncodingName("UTF-8");
      webView.getSettings().setJavaScriptEnabled(true);
      webView.getSettings().setDatabaseEnabled(true);
      webView.getSettings().setDomStorageEnabled(true);
      webView.getSettings().setAllowFileAccess(true);
      webView.getSettings().setUseWideViewPort(true);
      webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
      webView.getSettings().setLoadWithOverviewMode(true);
      webView.loadUrl("file:///android_asset/index.html");
  }
  </code></pre>
  
  <p>Below is the html css style to make the html dom to be 100% height. but it doesn't work on android browser. If I change the height to be "100hv", it only works on chrome browser not android browser. What else should I try to make the html dom to fill in 100% height of the screen?</p>
  
  <pre><code>var style = {
  width: '100%',
  margin: '0 auto',
  height: '100%'
  }
  </code></pre>
  
  <p>Please see below screenshot. I think the webview is filling the full screen of the device but the html inside the webview doesn't fill in. How can I fill in the bottom while space?</p>
  
  <p><a href="https://i.stack.imgur.com/itJ9f.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/itJ9f.jpg" alt="enter image description here"></a></p>