Webview loadDataWithBaseURL not displaying html android
<p>Trying to render html which is passed from a webservice to display in a webView using the loadData/loadDataWithBaseURL.</p>

<p>I've encoded the html string TextUtils.htmlEncode and wrapped it in &lt;html&gt; &lt;body&gt; but nothing is displayed.   </p>

<pre><code>mMessageDetailsHtmlString = &amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&amp;lt;div style=&amp;quot;color:#ffffff&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;h3&amp;gt;Test Promo&amp;lt;/h3&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;p style=&amp;quot;color:#ffffff&amp;quot;&amp;gt;Here is some text about a great test promo.&amp;lt;/p&amp;gt;&amp;lt;p style=&amp;quot;color:#ffffff&amp;quot;It includes an image (below) using a fully qualified URL&amp;lt;p&amp;gt;&amp;lt;p style=&amp;quot;color:#ffffff&amp;quot;&amp;gt;&amp;lt;img href=&amp;quot;http://myserver.com/media/images/img-logo.png&amp;quot; /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;p style=&amp;quot;color:#ffffff&amp;quot;&amp;gt;This is a test message with white text&amp;lt;/p&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;

//used loadDataWithBaseURL with a fake base url as loadData didn't work
mWebView.loadDataWithBaseURL("http://null", mMessageDetailsHtmlString, "text/html", "utf-8", null);
</code></pre>
