Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
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 ()

Added in API level 1

Public Methods

public CharacterStyle getUnderlying ()

Added in API level 1

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

public abstract void updateDrawState ( TextPaint tp)

Added in API level 1

public static CharacterStyle wrap ( CharacterStyle cs)

Added in API level 1

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.