EditText: In Android, you can use “EditText” class to create an editable textbox to accept user input.This tutorial shows you how to create a textbox in XML file, and demonstrates the use of key listener to display message typed in the textbox.

Step 1: Create a project, Open res -> layout -> activity_main.xml and paste this code below or you simple drag and drop spinner from widget window to app layout.

Step 2: Open app-> java -> package -> MainActivity.java and Add the below to code in it.