How to render text in a TextView that has URL visibility

Can you, if I can display text TextView

with a URL that looks like the appearance (blue underlined text)? And can it blend in with normal text (displayed as normal text)? And when I click on it, will it start WebView

loading that url?

+2


a source to share


2 answers


Check the autoLink TextView parameter.



+3


a source


You can also create a button, an image button, etc. and run a method like this when clicked:

private void openLink(){

Intent i = new Intent(Intent.ACTION_VIEW); 
supportIntent.setData(Uri.parse("http://www.example.tld/"));    
this.startActivity(i);  }

      



But Karan's solutions are probably more straight forward for your purpose.

Cheers Johe

0


a source







All Articles