How to Instantiate a new EditText

EditText was added in API Level 1

1. Declare an EditText.

2. After you declare the EditText object, add this line below to instantiate it. This will instantiate a new EditText named myEditText.

myEditText = new EditText(this);

3. Compile and run!

Resources:
www.codeofaninja.com/2011/07/android-alertdialog-example.html