# Print output for @column tags ?> CharacterStyle - Android SDK | Android Developers

Most visited


Recently visited


CharacterStyle

public abstract class CharacterStyle
extends Object

java.lang.Object
   ↳ android.text.style.CharacterStyle


The classes that affect character-level text formatting extend this class. Most extend its subclass MetricAffectingSpan, but simple ones may just implement UpdateAppearance.

Summary


Public constructors

CharacterStyle()

Public methods

CharacterStyle getUnderlying()

Returns "this" for most CharacterStyles, but for CharacterStyles that were generated by wrap(CharacterStyle), returns the underlying CharacterStyle.

abstract void updateDrawState(TextPaint tp)
static CharacterStyle wrap(CharacterStyle cs)

A given CharacterStyle can only applied to a single region of a given Spanned.

Inherited methods

Public constructors


CharacterStyle

public CharacterStyle ()

Public methods


getUnderlying

public CharacterStyle getUnderlying ()

Returns "this" for most CharacterStyles, but for CharacterStyles that were generated by wrap(CharacterStyle), returns the underlying CharacterStyle.

Returns
CharacterStyle

updateDrawState

public abstract void updateDrawState (TextPaint tp)

Parameters
tp TextPaint

wrap

public static CharacterStyle wrap (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.

Parameters
cs CharacterStyle

Returns
CharacterStyle

Browse this site in English?

You requested a page in English, but your language preference for this site is English.

Would you like to change your language preference and browse this site in English? If you want to change your language preference later, use the language menu at the bottom of each page.