title: WebView text size
body: <p>Sometimes, when I load my page (no static content, constructed on the fly) I see the font size too small <a href="http://s8.postimage.org/7akrcd8wl/webview1.png" rel="nofollow" title="small text">1</a>. If I reload I see it properly <a href="http://s7.postimage.org/cp6imu1dn/webview2.png" rel="nofollow" title="normal text">2</a>. I go back and forth and see it properly. And then ... small. Not a specific page, not on specific times. Not even specific version: I deploy on ICS device, no problem, then change something (like the font-size) and here is the problem. Same for deploys at 8 and 10 emulators.</p>
  
  <p>My view is pretty straightforward:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_weight="1"
      android:orientation="vertical" &gt;
      &lt;WebView
          xmlns:android="http://schemas.android.com/apk/res/android"
          android:id="@+id/webviewArticle"
          android:layout_width="match_parent"
          android:layout_height="fill_parent"
          android:layout_weight="1"
          android:padding="12dp" &gt;
      &lt;/WebView&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>The HTML construction (the content parameter is formatted html)</p>
  
  <pre><code>String toShow = new StringBuffer()
      .append("&lt;html&gt;")
      .append("&lt;head&gt;")
      .append("&lt;style type='text/css'&gt;body{ font-size: large; color: #FFFFFF; background-color: #000000;}&lt;/style&gt;")
      .append("&lt;/head&gt;")
      .append(String.format(
          "&lt;body&gt;&lt;h1&gt;%s&lt;/h1&gt;&lt;div&gt;&lt;img src='%s' alt='%s' style='width:100%%; height:auto' /&gt;&lt;/div&gt;&lt;div style='background-color:#000000;'&gt;%s&lt;/div&gt;&lt;div&gt;&lt;h3&gt;%s&lt;/h3&gt;&lt;/div&gt;&lt;/body&gt;",
          article.getTitle(),
          article.getImageLink().toString(),
          article.getTitle(),
          article.getContent().replace("%", "%25"), //html
          article.getAuthor()))
      .append("&lt;/html&gt;")
      .toString();
  
  mBrowser.getSettings().setBuiltInZoomControls(true);
  mBrowser.setInitialScale(1);
  CompatibilityUtils.setLoadWithOverviewMode(mBrowser, true); //set based on android version
  mBrowser.getSettings().setUseWideViewPort(true);
  mBrowser.loadDataWithBaseURL("fake://in/order/to/refresh", toShow, "text/html", "utf-8",null);
  </code></pre>
  
  <p>Any hint?</p>
  
  <p>Additional description 12/09/25: as the images suggest, the WebView thinks that the available space is half the screen and lays the text accordingly. This is is odd. What is oddest is that it thinks so for the text (the header above the image and the div below) and not the image!!!</p>