Code example for TextPaint

Methods: setColor

0
    } 
 
    public static CharacterStyle PLAIN_LINK_STYLE = new CharacterStyle() {
        @Override 
        public void updateDrawState(TextPaint paint) { 
            paint.setColor(paint.linkColor); 
        } 
    }; 
 
    public static CharacterStyle BOLD_LINK_STYLE = new CharacterStyle() {
        @Override 
        public void updateDrawState(TextPaint paint) { 
            paint.setColor(paint.linkColor); 
            paint.setTypeface(DEFAULT_BOLD); 
        } 
    }; 
 
    public static void makeLinksClickableIn(TextView textView) {
        textView.setMovementMethod(LinkMovementMethod.getInstance()); // otherwise links aren't clickable...
    }