Thursday, August 29, 2013

How to set link on phone number and email addresses available in TextView. Or How to use Linkify

Reference from : http://android-developers.blogspot.hu/2008/03/linkify-your-text.html

TextView tvDesc = (TextView) findViewById(R.id.tv_desc_data);
tvDesc.setText(details);
Linkify.addLinks(tvDesc, Linkify.ALL);


If we use Linkify.ALL then all phone numbers and emails in textview default set blue links(called hyperlink).
And when user click on this link automatically open call dialed pad or email box.

No comments:

Post a Comment