android.text.style
Class StyleSpan
java.lang.Object
android.text.style.CharacterStyle
android.text.style.MetricAffectingSpan
android.text.style.StyleSpan
- All Implemented Interfaces:
- UpdateLayout
public class StyleSpan
- extends MetricAffectingSpan
Describes a style in a span.
Note that styles are cumulative -- if both bold and italic are set in
separate spans, or if the base style is bold and a span calls for italic,
you get bold italic. You can't turn off a style from the base style.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StyleSpan
public StyleSpan(int style)
- Parameters:
style - An integer constant describing the style for this span. Examples
include bold, italic, and normal. Values are constants defined
in Typeface.
getStyle
public int getStyle()
- Returns the style constant defined in
Typeface.
updateDrawState
public void updateDrawState(TextPaint ds)
- Specified by:
updateDrawState in class CharacterStyle
updateMeasureState
public void updateMeasureState(TextPaint paint)
- Specified by:
updateMeasureState in class MetricAffectingSpan
Please submit a feedback, bug or feature