android.text
Class Layout.SpannedEllipsizer
java.lang.Object
android.text.Layout.Ellipsizer
android.text.Layout.SpannedEllipsizer
- All Implemented Interfaces:
- GetChars, Spanned, CharSequence
- Enclosing class:
- Layout
static class Layout.SpannedEllipsizer
- extends Layout.Ellipsizer
- implements Spanned
| Fields inherited from interface android.text.Spanned |
SPAN_EXCLUSIVE_EXCLUSIVE, SPAN_EXCLUSIVE_INCLUSIVE, SPAN_INCLUSIVE_EXCLUSIVE, SPAN_INCLUSIVE_INCLUSIVE, SPAN_MARK_MARK, SPAN_MARK_POINT, SPAN_PARAGRAPH, SPAN_POINT_MARK, SPAN_POINT_POINT, SPAN_PRIORITY, SPAN_PRIORITY_SHIFT, SPAN_USER, SPAN_USER_SHIFT |
|
Method Summary |
int |
getSpanEnd(Object tag)
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 tag)
Return the flags that were specified when Spannable.setSpan(java.lang.Object, int, int, int) was
used to attach the specified markup object, or 0 if the specified
object has not been attached. |
|
getSpans(int start,
int end,
Class<T> type)
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 |
getSpanStart(Object tag)
Return the beginning of the range of text to which the specified
markup object is attached, or -1 if the object is not attached. |
int |
nextSpanTransition(int start,
int limit,
Class type)
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. |
CharSequence |
subSequence(int start,
int end)
Returns a CharSequence from the start index (inclusive) to
the end index (exclusive) of this sequence. |
Layout.SpannedEllipsizer
public Layout.SpannedEllipsizer(CharSequence display)
getSpans
public <T> T[] getSpans(int start,
int end,
Class<T> type)
- Description copied from interface:
Spanned
- 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. Specify Object.class for the type if you
want all the objects regardless of type.
- Specified by:
getSpans in interface Spanned
getSpanStart
public int getSpanStart(Object tag)
- Description copied from interface:
Spanned
- Return the beginning of the range of text to which the specified
markup object is attached, or -1 if the object is not attached.
- Specified by:
getSpanStart in interface Spanned
getSpanEnd
public int getSpanEnd(Object tag)
- Description copied from interface:
Spanned
- Return the end of the range of text to which the specified
markup object is attached, or -1 if the object is not attached.
- Specified by:
getSpanEnd in interface Spanned
getSpanFlags
public int getSpanFlags(Object tag)
- Description copied from interface:
Spanned
- Return the flags that were specified when
Spannable.setSpan(java.lang.Object, int, int, int) was
used to attach the specified markup object, or 0 if the specified
object has not been attached.
- Specified by:
getSpanFlags in interface Spanned
nextSpanTransition
public int nextSpanTransition(int start,
int limit,
Class type)
- Description copied from interface:
Spanned
- 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. Specify
null or Object.class for the type if you want every
transition regardless of type.
- Specified by:
nextSpanTransition in interface Spanned
subSequence
public CharSequence subSequence(int start,
int end)
- Description copied from interface:
CharSequence
- Returns a CharSequence from the
start index (inclusive) to
the end index (exclusive) of this sequence.
- Specified by:
subSequence in interface CharSequence- Overrides:
subSequence in class Layout.Ellipsizer
- Parameters:
start - The starting offset of the sub-sequence, that is, the
index of the first character that goes into the sub-sequenceend - The ending offset of the sub-sequence, that is, the
index of the first character after those that go into the
sub-sequence
- Returns:
- The requested sub-sequence
Please submit a feedback, bug or feature