I have a string resource
:
<string name="dialog"> text + 800-800-800 + text</string>
800-800-800
- is the phone number
I use this string
in my Dialog
:
The question is: how to make phone number clickable and onClick
dial this number and call from the phone ?
I know how to make hyperlink
using html <a href="">
tag, make TextView
clickable and setMovementMethod()
and navigate to website from the textview
but there is another case, I need behavior such as it is Intent.ACTION_DIAL
.
My idea is make from my string
3 different strings, and for middle string
with phone number set Onclick
listener, but I think it`s work-around, maybe there is better way how to answer to my question?
Hope, I clearly explain my problem. Thank you!