10

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:textColorLink, but can I remove the underline of it?

Mathias Conradt
  • 28,420
  • 21
  • 138
  • 192
Jammy Lee
  • 1,496
  • 1
  • 14
  • 32

3 Answers3

3

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
  • 124,308
  • 23
  • 334
  • 268
0

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

Jorgesys
  • 124,308
  • 23
  • 334
  • 268
0
Spanned android.text.Html.fromHtml(String source, ImageGetter imageGetter, TagHandler tagHandler)

The important part is the TagHandler. You have to implement one and then you can hopefully modify it.

Another solution: handle textview link click in my android app

Community
  • 1
  • 1
einschnaehkeee
  • 1,858
  • 2
  • 17
  • 20