pRaNaY pRaNaY - 2 months ago 13
Android Question

Android webview cant load html text

I am trying below code for webview, but i cannot get o/p in webview with given data input.

Below input text i want to view in webview.

String aboutUsString="
<p><img alt="" src="//" /></p>
<p><img alt="" src="//" /></p>
<p><img alt="" src="//" /></p>

Webview code:-

public void setWebpage() {
if (!aboutUsString.equals("")) {
webview.loadDataWithBaseURL("", aboutUsString, "text/html", "utf-8", "");


Try by adding the protocol(http:) to the URL you are giving to the 'p' tag. Replace the <p><img alt="" src="//" /></p> with

<p><img alt='' src='' /></p>

Hope this helps!