Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to intercept click on link in TextView?

I have TextView and it contain HTML with tags. I need to intercept user's clicks on this links, take value of "href" parameter, check it and open my activity if it local link or open browser if it link to another site.

I've try to search and find that, but I can't understand how to use it in my case.

Please, help.

like image 700
BArtWell Avatar asked Oct 21 '12 20:10

BArtWell


1 Answers

There's this method: https://stackoverflow.com/a/3452944/1799219

All it's really doing is passing the link to your own activity (as links are normally passed to other activities) and then you extract the URL.

like image 103
Casey Gibson - AOAUS Avatar answered Oct 11 '22 00:10

Casey Gibson - AOAUS