Android text clicking a portion to fire an intent similar to an href link
In one of my android screens, I want to have a 开发者_运维知识库checkbox and text such as this:
_
|_| I have agreed to the *terms of service*.
The text I have agreed to the *terms of service*
is in a constant string in my /values/strings.xml file. I know I can make the text I want a link with html
I have agreed to the <a href="some.website.com">*terms of service*</a>.
But is there a way to make it so that instead of a website being launched, I can launch a custom or display a dialog box?
Yes, there is a way.
http://blog.elsdoerfer.name/2009/10/29/clickable-urls-in-android-textviews/
精彩评论