tags:

views:

452

answers:

1

Hi,

I have simple HTML

<h2>Title</h2><br>
<p>description here</p>

I want to display it in TextView. How to do this???

Any help would be appreciated.

+10  A: 
myTextView.setText(Html.fromHtml("<h2>Title</h2><br><p>Description here</p>"));
David Hedlund
when i put these lines gap occurs between h2 and p even i have removed br but still there is a gap...how to resolve it??
UMMA
`h2` by definition creates a lot of margin around itself. and `p` also comes with some margin. if you don't want the gap, you might want to consider using other html elements.
David Hedlund
thank you very much :)
UMMA