2

I have a textView and I want to make the text clickable (urls and phone numbers)

I have successfully been using Linkify ex

Linkify.addLinks(tvDescription, Linkify.ALL);

Now I would like to make the text selectable using

tvDescription.setTextIsSelectable(true);

It does also work as long as I dont Linkify my textView.

If I use both lines of code

tvDescription.setTextIsSelectable(true);
Linkify.addLinks(tvDescription, Linkify.ALL);

the text will by linkifyed but the text wont be selectable.

I have been trying

tvDescription.setAutoLinkMask(Linkify.ALL);

but this does not seem to work at all.

How can I linkify my textView as well as make my text selectable?

Thanks for any response

M3rd0n
  • 311
  • 3
  • 14
  • By googling around I found these links [Link 1](http://cogitas.net/blog/2011/01/05/linkify-your-android-textview/) and [Link 2](http://www.indelible.org/ink/android-linkify/). These might be useful for you – silwar Dec 10 '12 at 13:19
  • From what I can find on these pages they are descriptions on how you can use and customize the use of Linkify. I have no problems with the functionality of Linkify. Its just that setTextIsSelectable(true) does not work while I use it and I don't know why. – M3rd0n Dec 10 '12 at 13:34
  • I have exactly the same problem and still have no answer – Ivan Feb 02 '13 at 12:15
  • same question was asked here http://stackoverflow.com/questions/8231172/linkify-textisselectable – Ivan Feb 02 '13 at 12:17
  • I'll just leave my answer to a similar question here: http://stackoverflow.com/a/16003280/427225 – vortexwolf Apr 14 '13 at 19:34
  • Thanks vorrtex, your code seems to work:).. This had been bugging me for a while. Tanks alot. – M3rd0n Apr 15 '13 at 18:59

0 Answers0