tags:

views:

192

answers:

1

Hi,

I have a string that contains some tags(<p>,<img>,etc).

Tell how to handle these tags in textview.

Thanks in advance.

+3  A: 
textView.setText(Html.fromHtml("<p>" + title + "</p>");

you can also user web view

WebView webview = new WebView(this);
 setContentView(webview);

 // Simplest usage: note that an exception will NOT be thrown
 // if there is an error loading this page (see below).
 webview.loadUrl("http://slashdot.org/");

 // Of course you can also load from any string:
 String summary = "<html><body>You scored <b>192 points.</body></html>";
 webview.loadData(summary, "text/html", "utf-8");

http://developer.android.com/reference/android/webkit/WebView.html

zapping
hey i am asking about TextViews.....
pk
Html.fromHtml() is not working properly. the tags are still shows as it is
pk