How can I specify a link so as not to underline the links?

Is there a way to say a link so as not to underline my links? I already use textView.setLinkTextColor(stateList) to change the color, but I would like to remove the underline, which is an insert in the link.

Is it possible?

+7
android underline linkify
source share
1 answer
  TextView tv = new TextView(this); SpannableString ss = new SpannableString( ""+getString(R.string.nonlinktext)+"\n"+getString(R.string.linkedtext)+""); ss.setSpan(new URLSpan(getString((R.string.linkedtext))), ss.length() - numberofcharactersinlink, ss.length(),Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); 

I managed to get this working using this implementation. A bit of a hack, but it works anyway.

+3
source share

All Articles