title: Android, WebView.getWidth() == window.innerWidth
body: <p>What combination of META tag settings in HTML and WebSettings in Java should I use to get the following result: window.innerWidth in Javascript should be always (in any Android version and on any device) equal to the WebView width in pixels.</p>
  
  <p>For instance, I set the WebView width to 1024px. In Android AVD emulator, window.innerWidth is equal to 683px (2/3 of 1024, or 150% scale).</p>
  
  <p>I tried the following META:</p>
  
  <pre><code>&lt;meta name="viewport" content="width=device-width;
  user-scalable=no; initial-scale=1.0;
  minimum-scale=1.0; maximum-scale=1.0;" /&gt;
  </code></pre>
  
  <p>-- doesn't work.</p>
  
  <p>Then I tried:</p>
  
  <pre><code>_WebView.getSettings().setLoadWithOverviewMode(true);
  _WebView.getSettings().setUseWideViewPort(true);
  _WebView.setInitialScale(100);
  </code></pre>
  
  <p>-- doesn't work too.</p>
  
  <p>Finally,</p>
  
  <pre><code>_WebView.getSettings().setDefaultZoom(ZoomDensity.FAR);
  </code></pre>
  
  <p>seems to be working. According to documentation, it means "100% looking like in 240dpi". I don't know, what dpi users device has! How to get the task done correctly?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I've just tested ZoomDensity.FAR on a high-dpi tablet -- it works <em>without</em> it and doesn't work <em>with</em> it!</p>
  
  <p>Regards,</p>