public abstract class

CharacterStyle

extends Object
java.lang.Object
   ↳ android.text.style.CharacterStyle
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

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.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CharacterStyle ()

Public Methods

public CharacterStyle getUnderlying ()

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

public abstract void updateDrawState (TextPaint tp)

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.