tags:

views:

91

answers:

2

I use a TextView with links by this:

TextView tv ... 
tv.setText( Html.fromHtml(somehtml)) 

It is ok to control the link color by setting attribute android:LinkColor , but can I remove the underline of it?

A: 

Just remove the html < u > tag, that indicates an underline text !

Jorgesys
The text that I will put into the TextView will be a html with <a> tag, and I want to make the link text in another color, so I use Html.fromHtml, but seems no way to remove the underline
Jammy Lee
A: 

OK now with html anchor tag, to avoid the underline now use the property STYLE="text-decoration:none"

< a STYLE="text-decoration:none" HREF=\"link.html\">it has no underline < /a >

this must work with a WebView but in a TextView I was using Android 1.5, 1.6 and thats not possible. =(

Jorgesys
so bad, I don't want to use webView everywhere, but seems no other way now. anyway thank you so much
Jammy Lee