FileDocCategorySizeDatePackage
EditText.javaAPI DocAndroid 1.5 API3143Wed May 06 22:41:56 BST 2009android.widget

EditText

public 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}

Fields Summary
Constructors Summary
public EditText(android.content.Context context)

        this(context, null);
    
public EditText(android.content.Context context, android.util.AttributeSet attrs)

        this(context, attrs, com.android.internal.R.attr.editTextStyle);
    
public EditText(android.content.Context context, android.util.AttributeSet attrs, int defStyle)

        super(context, attrs, defStyle);
    
Methods Summary
public voidextendSelection(int index)
Convenience for {@link Selection#extendSelection}.

        Selection.extendSelection(getText(), index);
    
protected booleangetDefaultEditable()

        return true;
    
protected MovementMethodgetDefaultMovementMethod()

        return ArrowKeyMovementMethod.getInstance();
    
public EditablegetText()

        return (Editable) super.getText();
    
public voidselectAll()
Convenience for {@link Selection#selectAll}.

        Selection.selectAll(getText());
    
public voidsetEllipsize(TextUtils.TruncateAt ellipsis)

        if (ellipsis == TextUtils.TruncateAt.MARQUEE) {
            throw new IllegalArgumentException("EditText cannot use the ellipsize mode "
                    + "TextUtils.TruncateAt.MARQUEE");
        }
        super.setEllipsize(ellipsis);
    
public voidsetSelection(int start, int stop)
Convenience for {@link Selection#setSelection(Spannable, int, int)}.

        Selection.setSelection(getText(), start, stop);
    
public voidsetSelection(int index)
Convenience for {@link Selection#setSelection(Spannable, int)}.

        Selection.setSelection(getText(), index);
    
public voidsetText(java.lang.CharSequence text, BufferType type)

        super.setText(text, BufferType.EDITABLE);