开发者

Android text clicking a portion to fire an intent similar to an href link

开发者 https://www.devze.com 2023-03-18 02:56 出处:网络
In one of my android screens, I want to have a 开发者_运维知识库checkbox and text such as this:

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/

0

精彩评论

暂无评论...
验证码 换一张
取 消