Just follow these steps:
- Set the text of the TextView with a bit of HTML (by using the Html.fromHTML method, or by using the strings.xml file)
- "<a href=\"http://www.programmingmobile.com\">ProMobile</a>"
- Set the MovementMethod of the TextView with LinkMovementMethod.getInstance()
That's it! It is important to note that this method does cause the link to open outside the control of your application. If you want the link to open within your app, you should open the link within a WebView instead.
No comments:
Post a Comment