Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Inherited Constants](https://developer.android.com/reference/android/text/ParcelableSpan#inhconstants) \| [Methods](https://developer.android.com/reference/android/text/ParcelableSpan#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/text/ParcelableSpan#inhmethods)

# ParcelableSpan

*** ** * ** ***


`
public


interface
ParcelableSpan
`


`


implements

https://developer.android.com/reference/android/os/Parcelable


`

|---|
| android.text.ParcelableSpan |

|---|
| Known indirect subclasses [AbsoluteSizeSpan](https://developer.android.com/reference/android/text/style/AbsoluteSizeSpan), [AlignmentSpan.Standard](https://developer.android.com/reference/android/text/style/AlignmentSpan.Standard), [Annotation](https://developer.android.com/reference/android/text/Annotation), [BackgroundColorSpan](https://developer.android.com/reference/android/text/style/BackgroundColorSpan), [BulletSpan](https://developer.android.com/reference/android/text/style/BulletSpan), [EasyEditSpan](https://developer.android.com/reference/android/text/style/EasyEditSpan), [ForegroundColorSpan](https://developer.android.com/reference/android/text/style/ForegroundColorSpan), [LeadingMarginSpan.Standard](https://developer.android.com/reference/android/text/style/LeadingMarginSpan.Standard), [LineBackgroundSpan.Standard](https://developer.android.com/reference/android/text/style/LineBackgroundSpan.Standard), [LineBreakConfigSpan](https://developer.android.com/reference/android/text/style/LineBreakConfigSpan), [LineHeightSpan.Standard](https://developer.android.com/reference/android/text/style/LineHeightSpan.Standard), [LocaleSpan](https://developer.android.com/reference/android/text/style/LocaleSpan), [NoWritingToolsSpan](https://developer.android.com/reference/android/text/style/NoWritingToolsSpan), [QuoteSpan](https://developer.android.com/reference/android/text/style/QuoteSpan), [RelativeSizeSpan](https://developer.android.com/reference/android/text/style/RelativeSizeSpan), and 12 others. |---|---| | [AbsoluteSizeSpan](https://developer.android.com/reference/android/text/style/AbsoluteSizeSpan) | A span that changes the size of the text it's attached to. | | [AlignmentSpan.Standard](https://developer.android.com/reference/android/text/style/AlignmentSpan.Standard) | Default implementation of the `https://developer.android.com/reference/android/text/style/AlignmentSpan`. | | [Annotation](https://developer.android.com/reference/android/text/Annotation) | Annotations are simple key-value pairs that are preserved across TextView save/restore cycles and can be used to keep application-specific data that needs to be maintained for regions of text. | | [BackgroundColorSpan](https://developer.android.com/reference/android/text/style/BackgroundColorSpan) | Changes the background color of the text to which the span is attached. | | [BulletSpan](https://developer.android.com/reference/android/text/style/BulletSpan) | A span which styles paragraphs as bullet points (respecting layout direction). | | [EasyEditSpan](https://developer.android.com/reference/android/text/style/EasyEditSpan) | Provides an easy way to edit a portion of text. | | [ForegroundColorSpan](https://developer.android.com/reference/android/text/style/ForegroundColorSpan) | Changes the color of the text to which the span is attached. | | [LeadingMarginSpan.Standard](https://developer.android.com/reference/android/text/style/LeadingMarginSpan.Standard) | The standard implementation of LeadingMarginSpan, which adjusts the margin but does not do any rendering. | | [LineBackgroundSpan.Standard](https://developer.android.com/reference/android/text/style/LineBackgroundSpan.Standard) | Default implementation of the `https://developer.android.com/reference/android/text/style/LineBackgroundSpan`, which changes the background color of the lines to which the span is attached. | | [LineBreakConfigSpan](https://developer.android.com/reference/android/text/style/LineBreakConfigSpan) | LineBreakSpan for changing line break style of the specific region of the text. | | [LineHeightSpan.Standard](https://developer.android.com/reference/android/text/style/LineHeightSpan.Standard) | Default implementation of the `https://developer.android.com/reference/android/text/style/LineHeightSpan`, which changes the line height of the attached paragraph. | | [LocaleSpan](https://developer.android.com/reference/android/text/style/LocaleSpan) | Changes the `https://developer.android.com/reference/java/util/Locale` of the text to which the span is attached. | | [NoWritingToolsSpan](https://developer.android.com/reference/android/text/style/NoWritingToolsSpan) | A span that signals to IMEs that writing tools should not modify the text. | | [QuoteSpan](https://developer.android.com/reference/android/text/style/QuoteSpan) | A span which styles paragraphs by adding a vertical stripe at the beginning of the text (respecting layout direction). | | [RelativeSizeSpan](https://developer.android.com/reference/android/text/style/RelativeSizeSpan) | Uniformly scales the size of the text to which it's attached by a certain proportion. | | [ScaleXSpan](https://developer.android.com/reference/android/text/style/ScaleXSpan) | Scales horizontally the size of the text to which it's attached by a certain factor. | | [StrikethroughSpan](https://developer.android.com/reference/android/text/style/StrikethroughSpan) | A span that strikes through the text it's attached to. | | [StyleSpan](https://developer.android.com/reference/android/text/style/StyleSpan) | Span that allows setting the style of the text it's attached to. | | [SubscriptSpan](https://developer.android.com/reference/android/text/style/SubscriptSpan) | The span that moves the position of the text baseline lower. | | [SuggestionRangeSpan](https://developer.android.com/reference/android/text/style/SuggestionRangeSpan) | A SuggestionRangeSpan is used to show which part of an EditText is affected by a suggestion popup window. | | [SuggestionSpan](https://developer.android.com/reference/android/text/style/SuggestionSpan) | Holds suggestion candidates for the text enclosed in this span. | | [SuperscriptSpan](https://developer.android.com/reference/android/text/style/SuperscriptSpan) | The span that moves the position of the text baseline higher. | | [TextAppearanceSpan](https://developer.android.com/reference/android/text/style/TextAppearanceSpan) | Sets the text appearance using the given `https://developer.android.com/reference/android/R.styleable#TextAppearance` attributes. | | [TtsSpan](https://developer.android.com/reference/android/text/style/TtsSpan) | A span that supplies additional meta-data for the associated text intended for text-to-speech engines. | | [TypefaceSpan](https://developer.android.com/reference/android/text/style/TypefaceSpan) | Span that updates the typeface of the text it's attached to. | | [URLSpan](https://developer.android.com/reference/android/text/style/URLSpan) | Implementation of the `https://developer.android.com/reference/android/text/style/ClickableSpan` that allows setting a url string. | | [UnderlineSpan](https://developer.android.com/reference/android/text/style/UnderlineSpan) | A span that underlines the text it's attached to. | |

<br />

*** ** * ** ***

A special kind of Parcelable for objects that will serve as text spans.
This can only be used by code in the framework; it is not intended for
applications to implement their own Parcelable spans.

## Summary

| ### Inherited constants |
|---|
| From interface `https://developer.android.com/reference/android/os/Parcelable` |---|---| | `int` | `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor. | | `int` | `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`". | |

| ### Public methods ||
|---|---|
| ` abstract int` | ` https://developer.android.com/reference/android/text/ParcelableSpan#getSpanTypeId()() ` Return a special type identifier for this span class. |

| ### Inherited methods |
|---|---|
| From interface ` https://developer.android.com/reference/android/os/Parcelable ` |---|---| | ` abstract int` | ` https://developer.android.com/reference/android/os/Parcelable#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. | | ` abstract void` | ` https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Flatten this object in to a Parcel. | ||

## Public methods

### getSpanTypeId

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract int getSpanTypeId ()
```

Return a special type identifier for this span class.

<br />

| Returns ||
|---|---|
| `int` | <br /> |