¡@

Home 

2014/10/16 ¤W¤È 08:27:05

android Programming Glossary: urlspannounderline

Remove underline from links in TextView - Android

http://stackoverflow.com/questions/4096851/remove-underline-from-links-in-textview-android

for URLSpan span spans int start s.getSpanStart span int end s.getSpanEnd span s.removeSpan span span new URLSpanNoUnderline span.getURL s.setSpan span start end 0 textView.setText s This requires a customized version of URLSpan which doesn't.. s This requires a customized version of URLSpan which doesn't enable the TextPaint's underline property private class URLSpanNoUnderline extends URLSpan public URLSpanNoUnderline String url super url @Override public void updateDrawState TextPaint ds super.updateDrawState.. which doesn't enable the TextPaint's underline property private class URLSpanNoUnderline extends URLSpan public URLSpanNoUnderline String url super url @Override public void updateDrawState TextPaint ds super.updateDrawState ds ds.setUnderlineText..

Android: textview hyperlink

http://stackoverflow.com/questions/9852184/android-textview-hyperlink

LinkMovementMethod.getInstance Then if you want to strip the link underline . Create a class public class URLSpanNoUnderline extends URLSpan public URLSpanNoUnderline String url super url @Override public void updateDrawState TextPaint ds super.updateDrawState.. Then if you want to strip the link underline . Create a class public class URLSpanNoUnderline extends URLSpan public URLSpanNoUnderline String url super url @Override public void updateDrawState TextPaint ds super.updateDrawState ds ds.setUnderlineText false.. for URLSpan span spans int start s.getSpanStart span int end s.getSpanEnd span s.removeSpan span span new URLSpanNoUnderline span.getURL s.setSpan span start end 0 textView.setText s And then just call this after you initialised the TextViews in..