9

Is there any way to tell linkify not to underline my links? I am already using textView.setLinkTextColor(stateList) to change the color, but I'd like to remove the underline that is inserts on the link.

Is this even possible?

Jack B Nimble
  • 5,039
  • 4
  • 40
  • 62
Ben
  • 16,124
  • 22
  • 77
  • 122

1 Answers1

3
    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 all the same.

DragonWork
  • 2,415
  • 1
  • 18
  • 20
null
  • 98
  • 1
  • 8