title: How can I load an HTML template into a WebView?
body: <p>Imagine an HTML template that looks like this:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;style type="text/css"&gt;
          body {
              color: white;
          }
      &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  The changes include:
  &lt;br/&gt;&lt;br/&gt;
  %1$s
  &lt;br/&gt;&lt;br/&gt;
  Would you like to update now?
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I know I can load the contents into a WebView with <code>webView.loadUrl("file:///android_asset/html/upgrade.html")</code>. But I also want to replace the <strong>$1</strong> at runtime, just as if I were loading it from an XML file using <code>String.format()</code>.</p>
  
  <p>Is it possible to load the file contents into a String first so I can run <code>String.format()</code> on it and then use <code>webView.loadData()</code> instead?</p>