Closed pchupik closed 6 years ago
Hey @pchupik, I'm busy traveling till 10th of Nov and so won't be able to look into this until then. :(
Looks like I found a fix for this. In BetterLinkMovementMethod.highlightUrl( )
add check textView for selection and clear focus if it has one:
text.setSpan(new BackgroundColorSpan(textView.getHighlightColor()), spanStart, spanEnd, Spannable.SPAN_INCLUSIVE_INCLUSIVE);
if (textView.hasSelection())
textView.clearFocus();
textView.setText(text);
Fixed in commit d0a7db1. Will release a new version soon. In the meanwhile, you can get a build off HEAD using jitpack.io.
In sample app make the textView text-selectable (e.g. by adding
android:textIsSelectable="true"
)