EditTextpublic class EditText extends TextView EditText is a thin veneer over TextView that configures itself
to be editable.
XML attributes
See {@link android.R.styleable#EditText EditText Attributes},
{@link android.R.styleable#TextView TextView Attributes},
{@link android.R.styleable#View View Attributes} |
Methods Summary |
---|
public void | extendSelection(int index)Convenience for {@link Selection#extendSelection}.
Selection.extendSelection(getText(), index);
| protected boolean | getDefaultEditable()
return true;
| protected MovementMethod | getDefaultMovementMethod()
return ArrowKeyMovementMethod.getInstance();
| public Editable | getText()
return (Editable) super.getText();
| public void | selectAll()Convenience for {@link Selection#selectAll}.
Selection.selectAll(getText());
| public void | setEllipsize(TextUtils.TruncateAt ellipsis)
if (ellipsis == TextUtils.TruncateAt.MARQUEE) {
throw new IllegalArgumentException("EditText cannot use the ellipsize mode "
+ "TextUtils.TruncateAt.MARQUEE");
}
super.setEllipsize(ellipsis);
| public void | setSelection(int start, int stop)Convenience for {@link Selection#setSelection(Spannable, int, int)}.
Selection.setSelection(getText(), start, stop);
| public void | setSelection(int index)Convenience for {@link Selection#setSelection(Spannable, int)}.
Selection.setSelection(getText(), index);
| public void | setText(java.lang.CharSequence text, BufferType type)
super.setText(text, BufferType.EDITABLE);
|
|