Code example for SpannableStringBuilder

Methods: appendlengthsetSpan

0
 
        if (d == null) {
            return; 
        } 
 
        int len = text.length();
        text.append("\uFFFC");
 
        text.setSpan(new ImageSpan(d, src), len, text.length(),
                     Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
    } 
 
    private static void startFont(SpannableStringBuilder text, Element node) {
        String color = node.attr("color");
        String face = node.attr("face");
 
        int len = text.length();
        text.setSpan(new Font(color, face), len, len, Spannable.SPAN_MARK_MARK);
    } 
 
Stop searching for code, let great code find you!  Add Codota to your java IDE