作者:倩-1130 | 来源:互联网 | 2023-05-19 16:01
IhavegettingdynamictextfromawebserviceandshowingthesameinaTextView.SometimestheTex
I have getting dynamic text from a web service and showing the same in a TextView. Sometimes the TextView has url like hello
. I have set the text using the following code.
我从Web服务获取动态文本并在TextView中显示相同的内容。有时TextView的网址类似于你好。我使用以下代码设置了文本。
textView.setText(Html.fromHtml(sampletext));
And also set android:autoLink="web"
in the corresponding xml of that contains the TextView
. Now the link is showing properly with blue color and underline, but I found the its just a dead link. Nothing is happening if we try to click it. What I have to do to make the link active?
并且还在包含TextView的相应xml中设置android:autoLink =“web”。现在链接显示正确的蓝色和下划线,但我发现它只是一个死链接。如果我们试图点击它,什么也没发生。我需要做些什么才能使链接生效?
7 个解决方案