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?
There is a really practical and easy way to remove underline for a text. And that is: textview. setPaintFlags(View. INVISIBLE);
@Override public void updateDrawState(@NonNull TextPaint ds) { // super. updateDrawState(ds); } },0, spannableString. length(), SPAN_EXCLUSIVE_EXCLUSIVE); The updateDrawState overrides the updateDrawState in the ClickableSpan class in Android, and by not calling super.
On your keyboard, press and hold the left or right Shift key and then press the End key to highlight the entire line. Press the Delete key to delete the line of text.
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. =(
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With