如何使复选框文本中的单词成为链接

发布于 2024-12-29 13:08:08 字数 72 浏览 1 评论 0原文

我的应用程序中有复选框,文本描述有四个单词,我需要将最后两个单词作为链接,然后单击最后两个单词以打开某个 URL。如何做到这一点?

I have CheckBox in my app and text description have four words and I need to make last two words to be link and when click on last two words to open some URL. How to do this ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

雨轻弹 2025-01-05 13:08:08

checkbox.setMovementMethod(LinkMovementMethod.getInstance());

    <string name="order_terms_and_condtions">text... <a href="link">Terms and conditions</a> ...text</string>

checkbox.setMovementMethod(LinkMovementMethod.getInstance());

    <string name="order_terms_and_condtions">text... <a href="link">Terms and conditions</a> ...text</string>
赠意 2025-01-05 13:08:08

你好,我不知道任何其他方法,但我有一个技巧,使用按钮并将最后两个单词设置为按钮文本,然后在单击侦听器上设置 url 并打开它。

hello i dont know any other way but i hv a trick use button and set last two word as text of button and on the click listener set url and open it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文