I have a phone number in a text view
(thats the only thing I have there). I am using :
Linkify.addLinks(textView, Linkify.ALL);
However, the phone number is not being recognized by linkify
. The number is of the format:
(123) 456-7890
. I have also tried 1234567890
and 123.456开发者_开发问答.7890
. Nothing works. Any help ?
thanks.
In your XML file of your Text View add an attribute android:phoneNumber="true"
Try this in the Click of the Text View :
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("tel:"
+ your_phone_number)));
Automatically the Text will have the property of Phone number.
Since you are trying something that is custom refer to this doc
http://developer.android.com/resources/articles/wikinotes-linkify.html
it will help you.
精彩评论