Android:通过 TextView 中的链接启动活动
我有一个 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
关于如何管理链接点击的问题已经发布,应该可以回答您的问题。
这是链接:
处理我的 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