Android
android.widget
public class

android.widget.EditText

java.lang.Object
android.view.View Drawable.Callback KeyEvent.Callback
android.widget.TextView ViewTreeObserver.OnPreDrawListener
android.widget.EditText

EditText is a thin veneer over TextView that configures itself to be editable.

XML attributes

See EditText Attributes, TextView Attributes, View Attributes

Known Direct Subclasses
Known Indirect Subclasses

Summary

XML Attributes inherited from class android.widget.TextView
XML Attributes inherited from class android.view.View
Constants inherited from class android.view.View
Fields inherited from class android.view.View

Public Constructors

            EditText(Context context)
            EditText(Context context, AttributeSet attrs)
            EditText(Context context, AttributeSet attrs, int defStyle)

Public Methods

          void  extendSelection(int index)
Convenience for extendSelection(Spannable, int).
          Editable  getText()
Return the text the TextView is displaying.
          void  selectAll()
Convenience for selectAll(Spannable).
          void  setSelection(int start, int stop)
Convenience for setSelection(Spannable, int, int).
          void  setSelection(int index)
Convenience for setSelection(Spannable, int).
          void  setText(CharSequence text, TextView.BufferType type)
Sets the text that this TextView is to display (see setText(CharSequence)) and also sets whether it is stored in a styleable/spannable buffer and whether it is editable.

Protected Methods

          boolean  getDefaultEditable()
Subclasses override this to specify default editability.
          MovementMethod  getDefaultMovementMethod()
Subclasses override this to specify a default movement method.
Methods inherited from class android.widget.TextView
Methods inherited from class android.view.View
Methods inherited from class java.lang.Object
Methods inherited from interface android.graphics.drawable.Drawable.Callback
Methods inherited from interface android.view.KeyEvent.Callback
Methods inherited from interface android.view.ViewTreeObserver.OnPreDrawListener

Details

Public Constructors

public EditText(Context context)

public EditText(Context context, AttributeSet attrs)

public EditText(Context context, AttributeSet attrs, int defStyle)

Public Methods

public void extendSelection(int index)

public Editable getText()

Return the text the TextView is displaying. If setText() was called with an argument of BufferType.SPANNABLE or BufferType.EDITABLE, you can cast the return value from this method to Spannable or Editable, respectively.

public void selectAll()

Convenience for selectAll(Spannable).

public void setSelection(int start, int stop)

public void setSelection(int index)

Convenience for setSelection(Spannable, int).

public void setText(CharSequence text, TextView.BufferType type)

Sets the text that this TextView is to display (see setText(CharSequence)) and also sets whether it is stored in a styleable/spannable buffer and whether it is editable.

Protected Methods

protected boolean getDefaultEditable()

Subclasses override this to specify default editability.

protected MovementMethod getDefaultMovementMethod()

Subclasses override this to specify a default movement method.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56