Example usage for android.text.style QuoteSpan QuoteSpan

List of usage examples for android.text.style QuoteSpan QuoteSpan

Introduction

In this page you can find the example usage for android.text.style QuoteSpan QuoteSpan.

Prototype

public QuoteSpan() 

Source Link

Document

Creates a QuoteSpan with the default values.

Usage

From source file:com.avapira.bobroreader.hanabira.HanabiraParser.java

private void paintQuotes() {
    Pattern pattern = Pattern.compile("^>[^>].*?$", Pattern.MULTILINE);
    Matcher matcher = pattern.matcher(builder);
    while (matcher.find()) {
        int start = matcher.start();
        int end = matcher.end();
        builder.setSpan(new QuoteSpan(), start, end, 0);
    }/*ww  w  . j  av  a 2  s .c  o m*/
}

From source file:com.nttec.everychan.ui.presentation.HtmlParser.java

private static void endBlockquote(SpannableStringBuilder text, ThemeColors colors) {
    int len = text.length();
    Object obj = getLast(text, Blockquote.class);
    int where = text.getSpanStart(obj);
    text.removeSpan(obj);/*from  ww  w .j  a v  a  2s  .  c  om*/

    if (where != len) {
        Blockquote b = (Blockquote) obj;
        if (b.mIsUnkfunc) {
            if (colors != null) {
                text.setSpan(new ForegroundColorSpan(colors.quoteForeground), where, len,
                        Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
            }
        } else {
            text.setSpan(new QuoteSpan(), where, len, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
        }
    }
}

From source file:org.miaowo.miaowo.util.Html.java

private static void endBlockquote(Editable text) {
    endBlockElement(text);
    end(text, Blockquote.class, new QuoteSpan());
}