English | Site Directory

Android - An Open Handset Alliance Project

android.widget
public class

android.widget.EditText

java.lang.Object
android.view.View Drawable.Callback KeyEvent.Callback
android.widget.TextView
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

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, Map inflateParams)
          EditText(Context context, AttributeSet attrs, Map inflateParams, 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, 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