How to make a URL/link clickable in a textview which is inside a Listview?
Let us assume that you are binding your Listview to a custom adapter. In that case, the following piece of code goes into your getView method call:
Code:
textView.setText(Html.fromHtml(item.gettext()));
textView.setAutoLinkMask(Linkify.WEB_URLS);
Took me sometime to find this out :)
No comments:
Post a Comment