Simple Login with Relative Layout in Android Studio
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
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"
tools:context=".MainActivity">
<EditText
android:id="@+id/editTextTextPersonName"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textPersonName"
android:text="User Name" />
<EditText
android:id="@+id/editTextPhone"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="phone"
android:text="Phone No"
android:layout_below="@+id/editTextTextPersonName"
/>
<EditText
android:id="@+id/editTextTextEmailAddress"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textEmailAddress"
android:text="Email id"
android:layout_below="@+id/editTextPhone"
/>
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/editTextTextEmailAddress"
android:layout_alignParentLeft="true"
android:layout_marginLeft="54dp"
android:layout_marginTop="0dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:text="Cancel" />
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button1"
android:layout_alignParentRight="true"
android:layout_marginTop="-47dp"
android:layout_marginRight="72dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:text="Submit" />
</RelativeLayout>