0

how to set android:autoLink="web" that can be set inside XML inside the class, for example for this textView

final TextView finalTv;
finalTv.setMovementMethod(testCase);
Dasser Basyouni
  • 3,142
  • 5
  • 26
  • 50

1 Answers1

1

Per the Android documentation, you should use TextView's setAutoLinkMask (https://developer.android.com/reference/android/widget/TextView.html#setAutoLinkMask(int)), passing in one of these enums:

https://developer.android.com/reference/android/text/util/Linkify.html#ALL

For web, you would probably want to use this value: https://developer.android.com/reference/android/text/util/Linkify.html#WEB_URLS

nicobatu
  • 1,377
  • 3
  • 15
  • 34