|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Editable
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 Class Summary | |
|---|---|
static class |
Editable.Factory
Factory used by TextView to create new Editables. |
| Field Summary |
|---|
| 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 | |
|---|---|
Editable |
append(char text)
Convenience for append(String.valueOf(text)). |
Editable |
append(CharSequence text)
Convenience for replace(length(), length(), text, 0, text.length()) |
Editable |
append(CharSequence text,
int start,
int end)
Convenience for replace(length(), length(), text, start, end) |
void |
clear()
Convenience for replace(0, length(), "", 0, 0) |
void |
clearSpans()
Removes all spans from the Editable, as if by calling Spannable.removeSpan(java.lang.Object) on each of them. |
Editable |
delete(int st,
int en)
Convenience for replace(st, en, "", 0, 0) |
InputFilter[] |
getFilters()
Returns the array of input filters that are currently applied to changes to this Editable. |
Editable |
insert(int where,
CharSequence text)
Convenience for replace(where, where, text, 0, text.length()); |
Editable |
insert(int where,
CharSequence text,
int start,
int end)
Convenience for replace(where, where, text, start, end) |
Editable |
replace(int st,
int en,
CharSequence text)
Convenience for replace(st, en, text, 0, text.length()) |
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. |
void |
setFilters(InputFilter[] filters)
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. |
| Methods inherited from interface android.text.GetChars |
|---|
getChars |
| Methods inherited from interface android.text.Spannable |
|---|
removeSpan, setSpan |
| Methods inherited from interface android.text.Spanned |
|---|
getSpanEnd, getSpanFlags, getSpans, getSpanStart, nextSpanTransition |
| Methods inherited from interface java.lang.CharSequence |
|---|
charAt, length, subSequence, toString |
| Method Detail |
|---|
Editable replace(int st,
int en,
CharSequence source,
int start,
int end)
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(android.text.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.
Editable replace(int st,
int en,
CharSequence text)
replace(int, int, CharSequence, int, int)
Editable insert(int where,
CharSequence text,
int start,
int end)
replace(int, int, CharSequence, int, int)
Editable insert(int where,
CharSequence text)
replace(int, int, CharSequence, int, int)
Editable delete(int st,
int en)
replace(int, int, CharSequence, int, int)Editable append(CharSequence text)
append in interface Appendabletext - the CharSequence to be append
Appendablereplace(int, int, CharSequence, int, int)
Editable append(CharSequence text,
int start,
int end)
append in interface Appendabletext - the CharSequence to be appendstart - the index to spicify the start position of
CharSequence to be append, must be non-negative,
and not larger than the endend - the index to speicify the end position of
CharSequence to be append, must be non-negative,
and not larger than the size of csq
Appendablereplace(int, int, CharSequence, int, int)Editable append(char text)
append in interface Appendabletext - the character to append
Appendablereplace(int, int, CharSequence, int, int)void clear()
Note that this clears the text, not the spans;
use {@link #clearSpans} if you need that.void clearSpans()
Spannable.removeSpan(java.lang.Object) on each of them.
void setFilters(InputFilter[] filters)
InputFilter[] getFilters()
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||