Class EditText

All Implemented Interfaces:
Drawable.Callback, ViewTreeObserver.OnPreDrawListener

public class EditText extends TextView
A user interface element for entering and modifying text.

You can receive callbacks as a user changes text by adding a TextWatcher to the edit text. This is useful when you want to add auto-save functionality as changes are made, or validate the format of user input, for example. You add a text watcher using the TextView.addTextChangedListener(icyllis.modernui.text.TextWatcher) method.

To create an EditText (an editable TextView):

  EditText editText = new EditText();
 

To make it a single line EditText (a text field):

  editText.setSingleLine();
 
To make it a password EditText:
  editText.setTransformationMethod(PasswordTransformationMethod.getInstance());