Android LinkMovementMethod in XML?

To activate Linkify behavior, I do this in code:

textView.setMovementMethod (LinkMovementMethod.getInstance ());

Is there any way to set this in xml layout for text view?

+4
source share
2 answers

No no. If you use setMovementMethod(LinkMovementMethod.getInstance()); in many places in your application that you want to avoid, you should consider creating and using a custom class that extends the TextView that executes this method.

+4
source

Use the "autoLink" property in the XML layout

+1
source

All Articles