FileDocCategorySizeDatePackage
CharacterStyle.javaAPI DocAndroid 1.5 API2954Wed May 06 22:41:56 BST 2009android.text.style

CharacterStyle

public abstract class CharacterStyle extends Object
The classes that affect character-level text formatting extend this class. Most extend its subclass {@link MetricAffectingSpan}, but simple ones may just implement {@link UpdateAppearance}.

Fields Summary
Constructors Summary
Methods Summary
public android.text.style.CharacterStylegetUnderlying()
Returns "this" for most CharacterStyles, but for CharacterStyles that were generated by {@link #wrap}, returns the underlying CharacterStyle.

        return this;
    
public abstract voidupdateDrawState(android.text.TextPaint tp)

public static android.text.style.CharacterStylewrap(android.text.style.CharacterStyle cs)
A given CharacterStyle can only applied to a single region of a given Spanned. If you need to attach the same CharacterStyle to multiple regions, you can use this method to wrap it with a new object that will have the same effect but be a distinct object so that it can also be attached without conflict.

        if (cs instanceof MetricAffectingSpan) {
            return new MetricAffectingSpan.Passthrough((MetricAffectingSpan) cs);
        } else {
            return new Passthrough(cs);
        }