Operating System:
In this tutorial we will try to create a Simple Login Application Using Android. Android is basically a piece of software that allows your hardware to function. The android is an open-source operating system it's free and user friendly to mobile developers. Android is available to any device such as TV, phones, watches, etc.
So now let's do the coding.
Layout Design
We will now create the design for the application, first, locate the layout folder and select the activity_login.xml. Then copy and paste the code below.
activity_login.xmlNext is create another layout by right-clicking the layout folder namely activity_user.xml. Then write these blocks code to the layout script.
activity_user.xmlAndroid Manifest File
The Android Manifest file provides essential information about your app to the Android system in which the system must required before running the code.
The Main Function
Login.javaThis code contains the main function of the application. This code will login the user when the username and password are entered correctly. To create the function just write the code inside the Login class
This code will render a new layout after the user successfully login. This is where the user is redirect after entering the correction information. Just write these block of codes inside the User class.
Try to run and see if it works:
username: admin
password: admin
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.
Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.
FOR YOUR OWN SAFETY, PLEASE:
1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.