SpannableString

public class SpannableString extends Object
implements CharSequence CharSequence GetChars Spannable

This is the class for text whose content is immutable but to which markup objects can be attached and detached. For mutable text, see SpannableStringBuilder.

Inherited Constant Summary

Public Constructor Summary

SpannableString(CharSequence source)

Public Method Summary

final char
charAt(int i)
Returns the char value at the specified index.
boolean
equals(Object o)
final void
getChars(int start, int end, char[] dest, int off)
Exactly like String.getChars(): copy chars start through end - 1 from this CharSequence into dest beginning at offset destoff.
int
getSpanEnd(Object what)
Return the end of the range of text to which the specified markup object is attached, or -1 if the object is not attached.
int
getSpanFlags(Object what)
Return the flags that were specified when setSpan(Object, int, int, int) was used to attach the specified markup object, or 0 if the specified object has not been attached.
int
getSpanStart(Object what)
Return the beginning of the range of text to which the specified markup object is attached, or -1 if the object is not attached.
<T> T[]
getSpans(int queryStart, int queryEnd, Class<T> kind)
Return an array of the markup objects attached to the specified slice of this CharSequence and whose type is the specified type or a subclass of it.
int
final int
length()
Returns the length of this character sequence.
int
nextSpanTransition(int start, int limit, Class kind)
Return the first offset greater than or equal to start where a markup object of class type begins or ends, or limit if there are no starts or ends greater than or equal to start but less than limit.
void
removeSpan(Object what)
void
setSpan(Object what, int start, int end, int flags)
final CharSequence
subSequence(int start, int end)
Returns a new CharSequence that is a subsequence of this sequence.
final String
static SpannableString
valueOf(CharSequence source)

Inherited Method Summary