I’m populating a TextView with text and phone numbers, like so:
tv.setText("Here is a phone number: 1234567890. OK?");
That appears fine in my emulator. Now, I want to linkify the phone numbers, so I’ve done the following:
tv.setText("Here is a phone number: 1234567890. OK?");
tv.setAutoLinkMask(Linkify.PHONE_NUMBERS);
This makes the phone number disappear and I see:
Here is a phone number: . OK?
It’s basically showing the phone number but it’s invisible. If I touch the space where the (invisible) phone number is then Android loads up the dialer and dials 1234567890. It’s not that the phone number is white on white — I’ve changed the background to red and it does not appear white on red — it is invisible.
Any clues? Thanks.
Try setting the
android:textColorLinkattribute on yourTextView.