Skip to main content
1 of 2
Pravesh
  • 832
  • 1
  • 9
  • 20

The easiest thing that worked for me is to use Linkify

TextView txt_Message = (TextView) view.findViewById(R.id.txt_message); txt_Message.setText("This is link https://www.google.co.in/"); Linkify.addLinks(txt_Message, Linkify.WEB_URLS); 

and it will automatically detect the web urls from the text in the textview.

Pravesh
  • 832
  • 1
  • 9
  • 20