Nested Classes
class
Factory used by TextView to create new Editables.
[Expand]
Inherited Constants
From interface
android.text.Spanned
int
This flag is set on spans that are being used to apply temporary
styling information on the composing text of an input method, so that
they can be found and removed when the composing text is being
replaced.
int
Spans of type SPAN_EXCLUSIVE_EXCLUSIVE do not expand
to include text inserted at either their starting or ending point.
int
Non-0-length spans of type SPAN_EXCLUSIVE_INCLUSIVE expand
to include text inserted at their ending point but not at their
starting point.
int
Non-0-length spans of type SPAN_INCLUSIVE_EXCLUSIVE expand
to include text inserted at their starting point but not at their
ending point.
int
Spans of type SPAN_INCLUSIVE_INCLUSIVE expand
to include text inserted at either their starting or ending point.
int
This flag will be set for intermediate span changes, meaning there
is guaranteed to be another change following it.
int
0-length spans with type SPAN_MARK_MARK behave like text marks:
they remain at their original offset when text is inserted
at that offset.
int
SPAN_PARAGRAPH behaves like SPAN_INCLUSIVE_EXCLUSIVE
(SPAN_MARK_MARK), except that if either end of the span is
at the end of the buffer, that end behaves like _POINT
instead (so SPAN_INCLUSIVE_INCLUSIVE if it starts in the
middle and ends at the end, or SPAN_EXCLUSIVE_INCLUSIVE
if it both starts and ends at the end).
int
Bitmask of bits that are relevent for controlling point/mark behavior
of spans.
int
0-length spans with type SPAN_POINT_POINT behave like cursors:
they are pushed forward by the length of the insertion when text
is inserted at their offset.
int
The bits specified by the SPAN_PRIORITY bitmap determine the order
of change notifications -- higher numbers go first.
int
The bits numbered just above SPAN_PRIORITY_SHIFT determine the order
of change notifications -- higher numbers go first.
int
The bits specified by the SPAN_USER bitfield are available
for callers to use to store scalar data associated with their
span object.
int
The bits numbered SPAN_USER_SHIFT and above are available
for callers to use to store scalar data associated with their
span object.
Public Methods
abstract
Editable
Convenience for replace(length(), length(), text, 0, text.length())
abstract
Editable
CharSequence text, int start, int end)
Convenience for replace(length(), length(), text, start, end)
abstract
Editable
Convenience for append(String.valueOf(text)).
abstract
void
Convenience for replace(0, length(), "", 0, 0)
abstract
void
Removes all spans from the Editable, as if by calling
abstract
Editable
Convenience for replace(st, en, "", 0, 0)
Returns the array of input filters that are currently applied
to changes to this Editable.
abstract
Editable
CharSequence text, int start, int end)
Convenience for replace(where, where, text, start, end)
abstract
Editable
Convenience for replace(where, where, text, 0, text.length());
abstract
Editable
CharSequence source, int start, int end)
Replaces the specified range (st…en) of text in this
Editable with a copy of the slice start…end from
source.
abstract
Editable
CharSequence text)
Convenience for replace(st, en, text, 0, text.length())
abstract
void
Sets the series of filters that will be called in succession
whenever the text of this Editable is changed, each of which has
the opportunity to limit or transform the text that is being inserted.
[Expand]
Inherited Methods
From interface
android.text.GetChars
abstract
void
Exactly like String.getChars(): copy chars start
through end - 1 from this CharSequence into dest
beginning at offset destoff.
From interface
android.text.Spannable
abstract
void
Remove the specified object from the range of text to which it
was attached, if any.
abstract
void
Object what, int start, int end, int flags)
Attach the specified markup object to the range start…end
of the text, or move the object to that range if it was already
attached elsewhere.
From interface
android.text.Spanned
abstract
int
Return the end of the range of text to which the specified
markup object is attached, or -1 if the object is not attached.
abstract
int
Return the flags that were specified when
abstract
int
Return the beginning of the range of text to which the specified
markup object is attached, or -1 if the object is not attached.
abstract
T[]
Class 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.
abstract
int
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.
From interface
java.lang.Appendable
Appends the character sequence csq.
CharSequence csq, int start, int end)
Appends a subsequence of csq.
Appends the specified character.
From interface
java.lang.CharSequence
abstract
char
Returns the character at the specified index, with the first character
having index zero.
abstract
int
Returns the number of characters in this sequence.
Returns a CharSequence from the start index (inclusive)
to the end index (exclusive) of this sequence.
abstract
String
Returns a string with the same characters in the same order as in this
sequence.
Public Methods
public
abstract
Editable
append
Convenience for replace(length(), length(), text, 0, text.length())
Parameters
textthe character sequence to append.
Returns
this Appendable.
public
abstract
Editable
append
(CharSequence text, int start, int end)
Convenience for replace(length(), length(), text, start, end)
Parameters
textthe character sequence to append.
startthe first index of the subsequence of csq that is
appended.
endthe last index of the subsequence of csq that is
appended.
Returns
this Appendable.
public
abstract
Editable
append
(char text)
Convenience for append(String.valueOf(text)).
Parameters
textthe character to append.
Returns
this Appendable.
public
abstract
void
clear
()
public
abstract
void
clearSpans
()
Removes all spans from the Editable, as if by calling
public
abstract
Editable
delete
(int st, int en)
Convenience for replace(st, en, "", 0, 0)
public
abstract
InputFilter[]
getFilters
()
Returns the array of input filters that are currently applied
to changes to this Editable.
public
abstract
Editable
insert
(int where, CharSequence text, int start, int end)
Convenience for replace(where, where, text, start, end)
public
abstract
Editable
insert
(int where, CharSequence text)
Convenience for replace(where, where, text, 0, text.length());
public
abstract
Editable
replace
(int st, int en, CharSequence source, int start, int end)
Replaces the specified range (st…en) of text in this
Editable with a copy of the slice start…end from
source. The destination slice may be empty, in which case
the operation is an insertion, or the source slice may be empty,
in which case the operation is a deletion.
Before the change is committed, each filter that was set with
source text.
If source
is Spanned, the spans from it are preserved into the Editable.
Existing spans within the Editable that entirely cover the replaced
range are retained, but any that were strictly within the range
that was replaced are removed. As a special case, the cursor
position is preserved even when the entire range where it is
located is replaced.
Returns
a reference to this object.
public
abstract
Editable
replace
(int st, int en, CharSequence text)
Convenience for replace(st, en, text, 0, text.length())
public
abstract
void
setFilters
Sets the series of filters that will be called in succession
whenever the text of this Editable is changed, each of which has
the opportunity to limit or transform the text that is being inserted.
Except as noted, this content is licensed under Apache 2.0.
For details and restrictions, see the Content License.
Android 4.2 r1 —