android.text.Editable |
Known Indirect Subclasses |
This is the interface for text whose content and markup
can be changed (as opposed
to immutable text like Strings). If you make a
DynamicLayout
of an Editable, the layout will be reflowed as the text is changed.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Editable.Factory | Factory used by TextView to create new Editables. |
[Expand]
Inherited Constants
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.text.Spanned
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Convenience for replace(length(), length(), text, 0, text.length())
|
||||||||||
|
Convenience for replace(length(), length(), text, start, end)
|
||||||||||
|
Convenience for append(String.valueOf(text)).
|
||||||||||
|
Convenience for replace(0, length(), "", 0, 0)
|
||||||||||
|
Removes all spans from the Editable, as if by calling
removeSpan(Object)
on each of them.
|
||||||||||
|
Convenience for replace(st, en, "", 0, 0)
|
||||||||||
|
Returns the array of input filters that are currently applied
to changes to this Editable.
|
||||||||||
|
Convenience for replace(where, where, text, start, end)
|
||||||||||
|
Convenience for replace(where, where, text, 0, text.length());
|
||||||||||
|
Replaces the specified range (
st…en
) of text in this
Editable with a copy of the slice
start…end
from
source
.
|
||||||||||
|
Convenience for replace(st, en, text, 0, text.length())
|
||||||||||
|
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
|
|||||||||||
From interface
android.text.Spannable
|
|||||||||||
From interface
android.text.Spanned
|
|||||||||||
From interface
java.lang.Appendable
|
|||||||||||
From interface
java.lang.CharSequence
|
Convenience for replace(length(), length(), text, 0, text.length())
text | the character sequence to append. |
---|
Appendable
.
Convenience for replace(length(), length(), text, start, end)
text | the character sequence to append. |
---|---|
start |
the first index of the subsequence of
csq
that is
appended.
|
end |
the last index of the subsequence of
csq
that is
appended.
|
Appendable
.
Convenience for append(String.valueOf(text)).
text | the character to append. |
---|
Appendable
.
Removes all spans from the Editable, as if by calling
removeSpan(Object)
on each of them.
Convenience for replace(st, en, "", 0, 0)
Returns the array of input filters that are currently applied to changes to this Editable.
Convenience for replace(where, where, text, start, end)
Convenience for replace(where, where, text, 0, text.length());
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
setFilters(InputFilter[])
is given the opportunity to modify the
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.
Convenience for replace(st, en, text, 0, text.length())
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.