How to Create User Interface Login & Register with Android Studio 3.5

Beautiful Android Login and Signup Screens with Material Design

Login and Registration Form in Android

Follow Below XML Code for Design:

install package First than use this code at (build.gradle):

implementation 'com.google.android.material:material:1.0.0'

You may like these posts

1.Register  Ui XML

<?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"
    android:orientation="vertical"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_margin="10dp"
    tools:context=".LoginActivity"
    >

    <androidx.cardview.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:cardUseCompatPadding="true"
        android:elevation="4dp"
        >


        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:layout_margin="15dp"
            >
            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                >

                <TextView
                    android:id="@+id/textView"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Register"
                    android:textSize="28sp"
                    android:textStyle="bold"
                    android:textColor="@android:color/black"


                    />
                <TextView
                    android:id="@+id/txtsignup"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Login"
                    android:textSize="20sp"
                    android:textStyle="bold"
                    android:textColor="#9C27B0"
                    android:layout_alignParentRight="true"
                    android:layout_marginTop="4dp"
                    android:onClick="moveToLogin"

                    />
            </RelativeLayout>


            <com.google.android.material.textfield.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="40dp">



                <EditText
                    android:id="@+id/ed_username"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:hint="Username"
                    android:inputType="textPersonName" />
            </com.google.android.material.textfield.TextInputLayout>

            <com.google.android.material.textfield.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp">


                <EditText
                    android:id="@+id/ed_email"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:hint="Email"
                    android:inputType="textEmailAddress" />
            </com.google.android.material.textfield.TextInputLayout>

            <com.google.android.material.textfield.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp">

                <EditText
                    android:id="@+id/ed_password"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:ems="10"
                    android:hint="Password"
                    android:inputType="textPassword" />
            </com.google.android.material.textfield.TextInputLayout>



            <Button
                android:id="@+id/btn_register"
                android:backgroundTint="#9C27B0"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColor="@android:color/white"
                android:textSize="20dp"
                android:layout_marginTop="32dp"
                android:onClick="Register"
                android:padding="15dp"
                android:text="Register"
                />

        </LinearLayout>
    </androidx.cardview.widget.CardView>


</LinearLayout>

2. Login Ui XML

<?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"
    android:orientation="vertical"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_margin="10dp"
    tools:context=".LoginActivity"
    >

    <androidx.cardview.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:cardUseCompatPadding="true"
        android:elevation="4dp"
        >


        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:layout_margin="15dp"
            >
            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                >

                <TextView
                    android:id="@+id/textView"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Welcome,"
                    android:textSize="28sp"
                    android:textStyle="bold"
                    android:textColor="@android:color/black"
                    />
                <TextView
                    android:id="@+id/txtsignup"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Sign Up"
                    android:textSize="20sp"
                    android:textStyle="bold"
                    android:textColor="#9C27B0"
                    android:layout_alignParentRight="true"
                    android:layout_marginTop="4dp"
                    android:onClick="moveToRegistration"
                    />
            </RelativeLayout>
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Sign in to Continue"
                android:textStyle="bold"
                android:fontFamily="sans-serif-light"


                />

            <com.google.android.material.textfield.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="40dp">



                <EditText
                    android:id="@+id/ed_email"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:ems="10"
                    android:hint="Email"

                    />
            </com.google.android.material.textfield.TextInputLayout>

            <com.google.android.material.textfield.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="20dp">

                <EditText
                    android:id="@+id/ed_password"
                    android:layout_width="match_parent"
                    android:layout_height="42dp"
                    android:ems="10"
                    android:hint="Password"
                    android:inputType="textPassword"
                    />
            </com.google.android.material.textfield.TextInputLayout>


            <Button
                android:id="@+id/btn_login"
                android:backgroundTint="#9C27B0"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColor="@android:color/white"
                android:textSize="20dp"
                android:layout_marginTop="32dp"
                android:onClick="Login"
                android:padding="15dp"
                android:text="Login"
                />
        </LinearLayout>
    </androidx.cardview.widget.CardView>

</LinearLayout>


login form xml desgin android studio