Code example for TypefaceSpan

0
            else if (obj instanceof Spoiler)
                span = new SpoilerSpan(_owner);
            else if (obj instanceof Sample)
                span = new RelativeSizeSpan((float)0.80);
            else if (obj instanceof Code)
                span = new TypefaceSpan("monospace");
            else if (obj instanceof Font && _showTags)
                span = new ForegroundColorSpan(getColor(((Font)obj).getColor()) | 0xFF000000);
             
            if (span != null)
                _builder.setSpan(span, where, len, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
        } 
    } 
 
    public void characters(char[] ch, int start, int length) throws SAXException
    { 
        StringBuilder sb = new StringBuilder();
         
        /* 
         * Ignore whitespace that immediately follows other whitespace; 
         * newlines count as spaces.