Android‎ > ‎

Html Inside TextView

posted Feb 27, 2013, 2:50 AM by Akash Khaitan   [ updated Mar 9, 2013, 7:40 AM ]

TextView textView;  

textView
.setText(Html.fromHtml("<h>Html Test</h><p>Link <a href=\"http://www.google.com\">Google</a></p> "));

To enable the link click
, add the below code
textView.setMovementMethod(LinkMovementMethod.getInstance());

or


android:linksClickable="true" android:autoLink="web"

Comments