如何使复选框文本中的单词成为链接
我的应用程序中有复选框,文本描述有四个单词,我需要将最后两个单词作为链接,然后单击最后两个单词以打开某个 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
checkbox.setMovementMethod(LinkMovementMethod.getInstance());
checkbox.setMovementMethod(LinkMovementMethod.getInstance());
你好,我不知道任何其他方法,但我有一个技巧,使用按钮并将最后两个单词设置为按钮文本,然后在单击侦听器上设置 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.