public class StyleSpan extends MetricAffectingSpan implements ParcelableSpan
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
StyleSpan(int style) |
StyleSpan(Parcel src) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable's
marshalled representation.
|
int |
getSpanTypeId()
Return a special type identifier for this span class.
|
int |
getStyle()
Returns the style constant defined in
Typeface . |
void |
updateDrawState(TextPaint ds) |
void |
updateMeasureState(TextPaint paint) |
void |
writeToParcel(Parcel dest,
int flags)
Flatten this object in to a Parcel.
|
getUnderlying
wrap
public StyleSpan(int style)
style
- An integer constant describing the style for this span. Examples
include bold, italic, and normal. Values are constants defined
in Typeface
.public StyleSpan(Parcel src)
public int getSpanTypeId()
ParcelableSpan
getSpanTypeId
in interface ParcelableSpan
public int describeContents()
Parcelable
describeContents
in interface Parcelable
public void writeToParcel(Parcel dest, int flags)
Parcelable
writeToParcel
in interface Parcelable
dest
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.public int getStyle()
Typeface
.public void updateDrawState(TextPaint ds)
updateDrawState
in class CharacterStyle
public void updateMeasureState(TextPaint paint)
updateMeasureState
in class MetricAffectingSpan