saket / Better-Link-Movement-Method

Attempts to improve how clickable links are detected, highlighted and handled in TextView
Apache License 2.0
780 stars 78 forks source link

Update addLinks to support a textview, with HTML tags in it. #41

Closed cfsbhawkins closed 3 years ago

cfsbhawkins commented 3 years ago

closes: #31

Works when you use something like:

tvTaskDescription.text = HtmlCompat.fromHtml(task.description!!, HtmlCompat.FROM_HTML_MODE_LEGACY) BetterLinkMovementMethod.linkify(Linkify.ALL, tvTaskDescription)

saket commented 3 years ago

Thanks @cfsbhawkins, but I'm trying to keep this library a drop-in replacement for LinkMovementMethod. Adding linkify() functions were a mistake that I regret. A movement method library shouldn't be in the business of adding link spans to TextView, so I'll have to decline this. Sorry!

I should deprecate the linkify functions so that people stop using them and rely on framework APIs directly instead.