android textview点击一个链接 [英] android textview click on a link
本文介绍了android textview点击一个链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我有一个textview与跨越文本从Html.fromHtml(源)获取,如何使我的文本视图反应,当我点击链接?在我的textview中,链接是点击这里,这个文本是一个链接,它不是一个直接链接,如www.google.com。
If I have a textview with spanned text obtained from Html.fromHtml(source), how to make the textview to react when I click on a link? In my textview, link is something like "click here" and this text is a link, it's not a direct link like www.google.com.
推荐答案
我使用的最好方法,它总是为我工作
The best way I used and it always worked for me
android:autoLink="web"
希望这将有助于大家。
,rohit
这篇关于android textview点击一个链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文