开发者

How do I tell linkify not to underline links?

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

Is this even possible?


    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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜