Loading...

Android EditText Example

Android EditText widget is used to get user inputs like message box, login form, etc. In this tutorial, I am going to show how to use/create android EditText to control and get input from user.

Here, I have used two EditText to get input from the users, one for first name and next one for last name. After entering first name and last name you can see full name by clicking DISPLAY button.

Related:
Android Floating Labels for EditText Using Design Support Library
Android WebView Tutorial with Example
Android Layouts Tutorial

EditText Example: How to Get User Inputs in Android


XML Layout File

Following xml file contain two EditText widgets, one for first name and another for last name.

res/layout/edittext_example.xml

Java Activity File

src/AndroidEditTextExample.java

Now, run your EditText android application and enter your first and last name then click DISPLAY button you will see your full name(what you enter above) like below.

Android EditText Example

Android EditText Example

XML 4444005888772333790
Home item