0

I have an empty TextView set for my ListView. When there is no data, it shows the empty text, where I have description that they should go to Contacts application.

How can I linkify "Contacts" word so when tapped opens the Contacts application?

Pentium10
  • 204,586
  • 122
  • 423
  • 502

1 Answers1

2

Try setting up a Linkify rule to the content:// URL of the contact in question. Though I am not certain what the pattern would be -- Linkify is designed for things that are obvious regexes. If all you want is for them to tap on the description as a whole, set up an OnClickListener for it.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • I need the uri for the Contacts application, not for a specific contact. Do you know? – Pentium10 Mar 28 '10 at 09:28
  • There is no `Uri` for an application, per se. You can try using the `Uri` to the `Contacts` collection and see if that works. There should be a `CONTENT_URI` somewhere in the `ContactsContract` set of classes/interfaces. – CommonsWare Mar 28 '10 at 11:33