Android:通过 TextView 中的链接启动活动

发布于 2024-10-05 12:00:42 字数 141 浏览 0 评论 0原文

我有一个 TextView,我用 HTML 填充并链接它。 HTML 中的某些链接采用特殊格式,旨在链接到我的项目中的其他活动,而不是普通的 URL 链接。是否可以拦截 TextView 中此类链接的点击,并在链接采用特殊格式时执行自定义操作?

谢谢。

I have a TextView which I fill with HTML and linkify it then. Some of the links in HTML are in special format and meant to be links to other activities in my project, not normal URL links. Is it possible to intercept clicks on such links in TextView and do custom action in case the link is in special format?

Thanks.

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

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

发布评论

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

评论(1

琉璃梦幻 2024-10-12 12:00:42

关于如何管理链接点击的问题已经发布,应该可以回答您的问题。
这是链接:
处理我的 Android 应用中的 textview 链接点击

A question about how to manage link click has already been post and should answer your question.
Here is the link :
handle textview link click in my android app

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