Code example for TextPaint

Methods: setUnderlineText

0
    } 
 
    @Override 
    public void updateDrawState(TextPaint drawState) {
        super.updateDrawState(drawState);
        drawState.setUnderlineText(false);
    } 
 
    /** 
     * Removes URL underlines in a string by replacing URLSpan occurrences by 
     * URLSpanUtils objects. 
     * 
     * @param text A Spannable object. For example, a TextView casted as Spannable. 
     */ 
    public static void removeUnderlines(Spannable text) {
        URLSpan[] spans = text.getSpans(0, text.length(), URLSpan.class);
 
        for(URLSpan span:spans) {
            int start = text.getSpanStart(span);
            int end = text.getSpanEnd(span);
Contextual code suggestions in your IDE  Get Codota for Java