I have multiple text lines in single textView. It is like this:
Hello\n www.google.com\n
Since I have set android:autoLink="web"
thus www.google.com opens in the browser of my mobile. However, I want to know when this text is pressed so that I can use the value and open the link since I want to parse the output of this link in another activity. But I am not able to call a custom method based on the click of this URL, it only opens the browser by default.
Alternatively, if I could get what text is clicked it would be great. Since every text line ends with "\n" I want to get that line. Let's say in above example I click H, I want to get Hello so that I can use it for other purposes. Any way to do this?
Thanks.