This repository provides a complete technical overview and implementation details for the Android Login App.
It helps students/developers understand the project structure, environmental setup, and functionality.
This Android application demonstrates:
- Basic UI design using XML layouts
- Handling user input through EditText
- Button event handling in Java
- Displaying Toast messages and TextView updates
Follow these steps to clone and open the project in Android Studio:
git clone https://github.com/Azzzhar7/android-login-app.git
cd android-login-app- Launch Android Studio
- Click File → Open
- Select the cloned project folder
- Wait for Gradle build and sync to complete automatically
(If prompted, click Sync Now or Build → Rebuild Project)
- Connect a physical device or start an Android Emulator
- Click the Run
▶️ button - The app will install and launch automatically
The following key settings are already defined in the build.gradle (Module: app) file:
- compileSdk: 36
- minSdk: 24
- targetSdk: 36
- Java version: 11
No manual changes are needed.
Follow these steps to use it's code for your existing/new android project in Android Studio:
- Open Android Studio
- Select New Project → Empty Activity
- Set:
- Name:
MyApplication - Package name:
com.example.myapplication - Language: Java
- Minimum SDK: API 24: Android 7.0 (Nougat) or higher
- Name:
- Click Finish
-
Replace the default
activity_main.xmllayout with your custom login UI design.- Add input fields for username and password
- Add Login and Reset buttons
- Add a TextView to show output messages
-
In
MainActivity.java, implement:onCreate()method to handle layout setup and button listenerslogin(View v)method for validating inputs and showing messages- A Reset button to clear fields and display a Toast message
- Place your logo image inside
app/src/main/res/drawable/ - Example file name:
logo.png
- Click Run
▶️ in Android Studio - Enter any username and password
- Click Login or Reset
- Observe the Toast and TextView messages
- Use Toast for short notifications
- Use TextView for output messages
- Validate user input to prevent empty fields
- Add database or Firebase authentication later for production use
- Use Material Design components for modern UI styling
Run the following commands to initialize and push this project to your GitHub repository:
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com/your-username/android-login-app.git
git push -u origin mainAuthor: Muhammad Azhar
- Email: muhammadazhar@uaar.edu.pk
- LinkedIn: https://www.linkedin.com/in/azzzhar7/