コンテンツに移動

よくアクセスするページ

最近アクセスしたページ

navigation
added in API level 1

android.text.style

Provides classes used to view or change the style of a span of text in a View object. The classes with a subclass Standard are passed in to SpannableString.setSpan() or SpannableStringBuilder.setSpan() to add a new styled span to a string in a View object.

Interfaces

AlignmentSpan Span that allows defining the alignment of text at the paragraph level. 
LeadingMarginSpan A paragraph style affecting the leading margin. 
LeadingMarginSpan.LeadingMarginSpan2 An extended version of LeadingMarginSpan, which allows the implementor to specify the number of lines of the paragraph to which this object is attached that the "first line of paragraph" margin width will be applied to. 
LineBackgroundSpan  
LineHeightSpan The classes that affect the height of the line should implement this interface. 
LineHeightSpan.WithDensity The classes that affect the height of the line with respect to density, should implement this interface. 
ParagraphStyle The classes that affect paragraph-level text formatting implement this interface. 
TabStopSpan Paragraph affecting span that changes the position of the tab with respect to the leading margin of the line. 
UpdateAppearance The classes that affect character-level text in a way that modifies their appearance when one is added or removed must implement this interface. 
UpdateLayout The classes that affect character-level text formatting in a way that triggers a text layout update when one is added or removed must implement this interface. 
WrapTogetherSpan  

Classes

AbsoluteSizeSpan A span that changes the size of the text it's attached to. 
AlignmentSpan.Standard Default implementation of the AlignmentSpan
BackgroundColorSpan Changes the background color of the text to which the span is attached. 
BulletSpan A span which styles paragraphs as bullet points (respecting layout direction). 
CharacterStyle The classes that affect character-level text formatting extend this class. 
ClickableSpan If an object of this type is attached to the text of a TextView with a movement method of LinkMovementMethod, the affected spans of text can be selected. 
DrawableMarginSpan A span which adds a drawable and a padding to the paragraph it's attached to. 
DynamicDrawableSpan Span that replaces the text it's attached to with a Drawable that can be aligned with the bottom or with the baseline of the surrounding text. 
EasyEditSpan Provides an easy way to edit a portion of text. 
ForegroundColorSpan Changes the color of the text to which the span is attached. 
IconMarginSpan Paragraph affecting span, that draws a bitmap at the beginning of a text. 
ImageSpan Span that replaces the text it's attached to with a Drawable that can be aligned with the bottom or with the baseline of the surrounding text. 
LeadingMarginSpan.Standard The standard implementation of LeadingMarginSpan, which adjusts the margin but does not do any rendering. 
LocaleSpan Changes the Locale of the text to which the span is attached. 
MaskFilterSpan Span that allows setting a MaskFilter to the text it's attached to. 
MetricAffectingSpan The classes that affect character-level text formatting in a way that changes the width or height of characters extend this class. 
QuoteSpan A span which styles paragraphs by adding a vertical stripe at the beginning of the text (respecting layout direction). 
RelativeSizeSpan Uniformly scales the size of the text to which it's attached by a certain proportion. 
ReplacementSpan  
ScaleXSpan Scales horizontally the size of the text to which it's attached by a certain factor. 
StrikethroughSpan A span that strikes through the text it's attached to. 
StyleSpan Span that allows setting the style of the text it's attached to. 
SubscriptSpan The span that moves the position of the text baseline lower. 
SuggestionSpan Holds suggestion candidates for the text enclosed in this span. 
SuperscriptSpan The span that moves the position of the text baseline higher. 
TabStopSpan.Standard The default implementation of TabStopSpan that allows setting the offset of the tab stop from the leading margin of the first line of text. 
TextAppearanceSpan Sets the text color, size, style, and typeface to match a TextAppearance resource. 
TtsSpan A span that supplies additional meta-data for the associated text intended for text-to-speech engines. 
TtsSpan.Builder<C extends Builder<?>> A simple builder for TtsSpans. 
TtsSpan.CardinalBuilder A builder for TtsSpans of type TYPE_CARDINAL
TtsSpan.DateBuilder A builder for TtsSpans of type TYPE_DATE
TtsSpan.DecimalBuilder A builder for TtsSpans of type TYPE_DECIMAL
TtsSpan.DigitsBuilder A builder for TtsSpans of type TYPE_DIGITS
TtsSpan.ElectronicBuilder A builder for TtsSpans of type TYPE_ELECTRONIC
TtsSpan.FractionBuilder A builder for TtsSpans of type TYPE_FRACTION
TtsSpan.MeasureBuilder A builder for TtsSpans of type TYPE_MEASURE
TtsSpan.MoneyBuilder A builder for TtsSpans of type TYPE_MONEY
TtsSpan.OrdinalBuilder A builder for TtsSpans of type TYPE_ORDINAL
TtsSpan.SemioticClassBuilder<C extends SemioticClassBuilder<?>> A builder for TtsSpans, has setters for morphosyntactic features. 
TtsSpan.TelephoneBuilder A builder for TtsSpans of type TYPE_TELEPHONE
TtsSpan.TextBuilder A builder for TtsSpans of type TYPE_TEXT
TtsSpan.TimeBuilder A builder for TtsSpans of type TYPE_TIME
TtsSpan.VerbatimBuilder A builder for TtsSpans of type TYPE_VERBATIM
TypefaceSpan Changes the typeface family of the text to which the span is attached. 
UnderlineSpan A span that underlines the text it's attached to. 
URLSpan Implementation of the ClickableSpan that allows setting a url string. 
このサイトでは、ユーザーが選択したサイトの言語と表示設定を保存する目的で Cookie を使用しています。

Android デベロッパー向けの最新情報やヒントを入手して、Google Play での成功を手に入れましょう。

* 必須

送信しました

WeChat で Google Developers をフォローする

このサイトをで表示しますか?

ページの表示言語としてを選択しましたが、このサイトの言語はに設定されています。

言語設定を変更してこのサイトをで表示しますか?言語設定を変更する場合は、各ページの下にある言語メニューを使用してください。

このクラスには、API レベル 以上が必要です。

API レベル が選択されているため、このドキュメントは非表示になっています。左のナビゲーションの上にあるセレクタを使って、ドキュメントの API レベルを変更できます。

アプリに必要な API レベルを指定する方法について、詳しくは異なるプラットフォーム バージョンのサポートをご覧ください。

Take a short survey?
Help us improve the Android developer experience. (April 2018 — Developer Survey)