Android TextAppearanceSpan - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android TextAppearanceSpan class.

This code example shows how to use the following methods:getTextSize
This code example shows how to use the following methods:
    public String toString() { 
        return name; 
    } 
 
    public Object createStyle(Context context) { 
        return new TextAppearanceSpan(context, styleResourceId); 
    } 
 
} 
4
CodeRank
This code example shows how to use the following methods:
    public String toString() { 
        return name; 
    } 
 
    public Object createStyle(Context context) { 
        return new TextAppearanceSpan(context, styleResourceId); 
    } 
 
} 
4
CodeRank
This code example shows how to use the following methods:
                    String name = f.mColor.substring(1);
                    int colorRes = res.getIdentifier(name, "color", "android");
                    if (colorRes != 0) {
                        ColorStateList colors = res.getColorStateList(colorRes);
                        text.setSpan(new TextAppearanceSpan(null, 0, 0, colors,
                                null), where, len,
                                Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
                    } 
                } else { 
                    int c = getHtmlColor(f.mColor);
                    if (c != -1) {
                        text.setSpan(new ForegroundColorSpan(c | 0xFF000000),
                                where, len, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
                    } 
                } 
            } 
 
            if (f.mFace != null) {
                text.setSpan(new TypefaceSpan(f.mFace), where, len,
                        Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
3
CodeRank
This code example shows how to use the following methods:

Related Android TextAppearanceSpan Questions & Answers:

See Code Examples for Android TextAppearanceSpan Methods: