I have a String: myFullString which looks like:
<html>
<body style="background-color: transparent; margin-top:75px; padding:0px;">
<style type="text/css">
p {margin-left:40px; margin-right:40px; margin-top:40px; margin-bottom:40px; }
</style> <p>
<font face="helvetica" size=8 color=white>
<b> Heading
</b></font>
<font face="helvetica" size=6> <br/> <br/>
<br/> Address Line 1
<br/> Address Line 2 <br/>
<br/> Tel: PhoneNumber
<br/> Fax: Fax No <br/>
<br/> <br/><br/>
</font></p>
</body></html>
I want the phone numbers and/or link if any to appear as clickable/hi lighted. So I wrote the following code:
Spannable sp = new SpannableString(myFullString.toString());
Linkify.addLinks(sp, Linkify.ALL);
final String html = Html.toHtml(sp) ;
mWebView.setClickable(true);
mWebView.loadData(html, "text/html", "utf-8");
I get the following result:

In this webview, the texts are hyperlinked but we are able to see the tags.
I also tried using the following code:
Spannable sp = new SpannableString(myFullString.toString());
Linkify.addLinks(sp, Linkify.ALL);
mWebView.loadDataWithBaseURL(null, sp.toString(),"text/html", "utf-8", "about:blank");
But it’s giving the following output:

It shows the correct text font, but does not link the texts.
How do I modify my code such that the links are shown and it won’t show the tags?
The webview contents are created dynamically.
Since I was not able to find an easier way…
I did some thing like this for every line which was to be shown in the webpage:
now, it links the valid text….