Code example for TextPaint

Methods: setColor, setTypeface

0
    }; 
 
    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...
    } 
 
    public static interface Listener { 
        public void onClick(String command, View widget);
    } 
}