When I am using android on websites and reading emails, I notice that I can click on addresses to load into google maps, or click on phone numbers to call, or click on emails and send an email.
These elements on the web are formatted in a variety of ways, so there is some built in function that detects these sort of things.
How do I allow this within my app? I have a page which displays contact information in plain text and I would like the user to just be able to click.
Do I Absolutely need to create clicklisteners for each textview or is there a system function I just need to enable?
Href=tel: creates the call link. This tells the browser how to use the number. “Tel: 123-456-7890 “creates the HTML phone number. The number within the quotes is the number it will call.
Use
android:autoLink="phone"
in textView in the xml layout file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With