EditText in Android

In this lesson we will learn about EditText in Android. EditText is a standard entry widget in Android. EditText allow users to Enter data in Android Apps. For Example in Login Activity we need an username and password from user to open their account in App so to get username and password from user we can use EditText in our App. In this tutorial we will learn how to create a signup page design in Android.

EditText in Android, Learn Android for free. Owlbuddy.com


EditText Example
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:padding="16dp" android:orientation="vertical" tools:context=".SignupActivity"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Enter Name" android:inputType="text" android:layout_marginBottom="10dp" /> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Enter Email" android:inputType="textEmailAddress" android:layout_marginBottom="10dp" /> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Enter Password" android:inputType="textPassword" android:layout_marginBottom="10dp" /> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Enter Confirm Password" android:inputType="textPassword" android:layout_marginBottom="10dp" /> <Button android:layout_width="250dp" android:layout_height="wrap_content" android:layout_marginBottom="10dp" android:textColor="@color/colorWhite" android:background="@color/colorPrimary" android:text="Create my Account"/> </LinearLayout>


Check out the Output of code which we wrote in the XML layout file example

EditText in Android



Share this tutorial with your friends on your social Media..

EditText in Android EditText in Android EditText in Android EditText in Android



Now You Can Follow All These Tutorials on Your Android Mobile Just Download This App.


Owlbuddy.com