In a TextView, I want to popup a toast whenever a hyperlink is clicked, instead of opening the corresponding url in a browser. I use the following code, but the problem here is
Actually my senior figured out, we need to remove the original URLSpan before adding our own spans using setSpan()
// The original URLSpan needs to be removed to block the behavior of browser opening strBuilder.removeSpan(span);
Thanks Damian.