In the XML file that you want to add the URL, add the following code in the Properties panel for the Text property:
@string/my_url (or whatever url you defined in the string resource)
In the Properties panel, scroll down to the AutoLink property and click on the triangle button to expand the list and select web as the option.
NOTE: Notice there is a host of other options you can choose from depending on what you want to do (e.g., none, web, email, phone, map, and all).
- email—will open the default app
- phone—will open phone dialog with number
- map—will open Google map with latitude and longitude you give it.
CHECK POINT: You should notice that the text color changed to reflect that it is a link. Now, run the app in an emulator and click on the link. It should open the link that you specified.