Closed ismailnurudeen closed 1 year ago
A LinkMovementMethod
is only responsible for highlighting clicks, not inserting links into your text. You'll need to use Linkify.addLinks()
before/after you've set the movement method. I should mention this in the README.
When autoLink
is used in XML, TextView
resets the movement method to the platform LinkMovementMethod
so that creates some confusion. You'll have to override it again using textView.movementMethod = BetterLinkMovementMethod.getInstance()
.
I'd advise against using BetterLinkMovementMethod.linkify
because it causes the same confusion as platform's autoLink
property.
Okay, it makes sense now.
Thanks for the swift response, I would implement that and close the issue if it works.
I'm trying to open auto links with ChromeCustomTabs, so i intented to use this library to get the url upon click but the library is neither highlighting the links nor is it making them clickable.
Here`s the initial method i tried and nothing happened:
Then i decided to us this and it still isn't working.
When i set autoLink in XML, it highlights the links but just does what standard linkify does, opens the links in the default browser.