I am trying to get a textual representation for handling hyperlinks as well as phone numbers. Say my text is:
"555-555-555, www.google.com, <a href="www.google.com">Google!</a>"
If I run Html.fromHtml () on this line, then TextView will display Google! correct as a click link, but not the other two.
If I run Linktext.addLinks (TextView, Linkify.All) in TextView, then the first two will be correctly recognized as a phone number and URL, but html is not processed in the latter.
If I run both of them, then one or the other is respected, but not both at the same time. (Html.fromHtml will remove the html tags there, but it will not be a link if linkify is called after)
Any ideas on how to make both of these functions work at the same time? So, are all the links handled correctly? Thanks!
Edit: Also, the text is changed dynamically, so I'm not sure how I can configure the Linkify template for this.
source share