Two input string, for example:
1. Hyper link input:
"<a href=\"https://blog.twitter.com/official/en_us/topics/company/2018/keeping-your-account-secure.html\">Что случилось с паролями в логах Twitter</a>"
2. Simple URL:
https://www.youtube.com/watch?v=2Cj6CbC-DkU
TextView class has two ways how we could highlight links and make them clickable:
1. through the code:
TextView.setMovementMethod(LinkMovementMethod.getInstance());
2. through the XML:
android:autoLink="web"
The known issue that to handle hyper links we should use the first method with LinkMovementMethod, and remove the xml attribute "autoLink".
The point is that when I use this solution, my textView ignores the simple links(second input string from example). And vice versa - if I use the XML solution, textView will ignore hyper links.
The question is what should I use to support both: hyper links and simple urls?