I am trying to make my TextView clickable.
I have set setMovementMethod() with LinkMovementMethod.
myText.setMovementMethod(LinkMovementMethod.getInstance());
But when I set myText value to ‘cnn.com/money’ or ‘www.cnn.com/money’.Both are not clickable.
How can I make the text clickable (i.e. go to web browser for the link)?
Thank you.
Use Linkify:
If you just wanted to have weblinks in your textview be picked up, (ie not email addresses or phone numbers), then do:
See here for more cool stuff you can do with linkify.