Code example for RelativeSizeSpan

0
            if (opening) {
                HtmlToSpannedConverter.start(output, new Code());
                HtmlToSpannedConverter.start(output, new Code());
            } else { 
                HtmlToSpannedConverter.end(output, Code.class, new TypefaceSpan("monospace"));
                HtmlToSpannedConverter.end(output, Code.class, new RelativeSizeSpan(0.75f));
            } 
        } 
    } 
 
    private void startSpan(SpannableStringBuilder text, Attributes attributes) {
        Span span = Span.fromAttributes(attributes);
 
        int len = text.length();
        text.setSpan(span, len, len, Spanned.SPAN_MARK_MARK);
    } 
 
    private void endSpan(SpannableStringBuilder text) {
        int len = text.length();
        Span span = HtmlToSpannedConverter.getLast(text, Span.class);
        int where = text.getSpanStart(span);