

Using the autolink method you can easily show multiple link types in a single TextView. Use android:autoLink to identify the text as a mail address. In android:text you have to give the mail address. Here is the example code for this: įor this, you just need a TextView where you have to give the mail address and identify it as a mail address. Use android:autoLink to identify the text as a phone number. For example, you have to add +44 for the UK, +880 for Bangladesh, +91 for India. For phone numbers, you should always use the country code before the number. In android:text you have to give the phone number. Here is the example code for this: įor this, you just need a TextView where you have to give the number and identify it as a phone number. Use android:autoLink to identify the text as a web address. For example, you have to add '.com,' '.org,' '.xyz' with the web address.

For the web address, you should always use the domain part.

In android:text you have to give the web link. Here we are going to show all of them with example code.įor this, you just need a TextView where you have to give the web address or link and identify it as a web address. Because you don't need to touch Java or Kotlin for this. If you are a beginner then this method is the easiest method. You can open mail, phone dialer, web address, map using this method. Using the autolink method you can make TextView clickable.
