Easy Login Page in Android Studio using Java – 5 Steps Only
Pre-requisite Color
Please find the brand color as #8692f7 (Purple)
Add the color in the colors.xml file as given:
Download Login Background Image
Download the login background image for free:

Step-by-Step Implementation:
Step 1: Open Android Studio, Create New Project and Choose Empty Activity. Click Finish.

Step 2: Add Color under folder res ->values->colors.xml
You can use any color according to your app requirements, I have used our brand color #8692f7.
Step 3: Create custom_edittext.xml
Right-click on the drawable folder under the res folder then click on New -> Drawable Resource File
The round corners are 20dp, you can customize them as per your requirements.
Type the below code:
Step 4: Type the below code in activity_main.xml
We have created a minimal and beautiful design for the login page in android studio.
We have used Linear Layout in which a CardView is present and then further two EditText and one Button.
To give it a style, we have added the CardView background as custom_edittext.xml which will provide round corners with purple color.
Step 5: Type the below code in MainActivity.java
There is a button named as loginButton on which we have set an onClickListener and in that, we have written the below logic.
We have set the username as “user” and the password as “1234”, so if the string matches with the user’s string then the toast will be shown as Login Successful but if the user’s string does not match with the static string then the toast will be shown as “Login Failed!”.
Output
