Login page design in Android systems and how to use the multi-touch feature
4 minute(s) read
|
Published on: Aug 13, 2021
Updated on: Dec 14, 2021
|
By the time you log in to some of the apps, you may have encountered pages asking you to log in to those pages. For example, when logging in to Facebook, etc., you came across the same page. The login page asks you to enter your username and password to make sure you are logged in and not someone else. It is in this state that security increases. In this part of the tutorial, we teach you how to design and create a login page. It is recommended that you follow this article.
1- First, we must create two views, one to enter the username and the other to enter the password. Like the following:
2- Then, create a button and write the login text on it to use this button to log in. Like the following:
3- Then, you must apply the changes listed below in the Java file.
4- Then, create a security mechanism to increase security and prevent other people from entering. Like the following:
In this section, we want to provide an example of creating an application that can design and build a login page.
1- I use Eclipse IDE to create an Android application.
2- Name its login in the com.example.login package.
3- Modify the src / MainActivity.java file to add a different code.
4- The res/layout / activity_main file must be modified to add the XML component.
5- Change AndroidManifest.xml to get permissions.
6- All contents and code that are fully included in the file and program are as follows:
5- The contents of the activity_main.xml section are as follows:
6- The contents of the string.xml file are as follows:
7- The contents of the AndroidManifest.xml file section are as follows:
8- Run the IntentShare program.
9- You must connect your mobile device to the computer beforehand.
10- To run the program from Eclipse, we must open one of the program activity files and run it.
11- Enter the username and password, then enter the login button. Of course, it is worth mentioning that you enter the username and password to test the error to see the result.
The multitouch mode in Android system
This occurs when all but one finger touches the screen to operate.
1- Use the Eclipse IDE to create an Android application.
2- Name it Multitouch in the com.example.multitouch package.
3- Modify the src / MainActivity.java file to add a different code.
4- The res/layout / activity_main file must be modified to add the XML component.
5- Change AndroidManifest.xml to get permissions.
6- All contents and code that are fully included in the file and program are as follows:
7- The contents of the activity_main.xml. Files are as follows:
8- The contents of the string.xml file are as follows:
9- The contents of the AndroidManifest.xml file are as follows:
10- Run the IntentShare program.
11- You must connect your mobile device to the computer beforehand.
12- To run the program from Eclipse, we must open one of the program activity files and run it.
13- Then, we are faced with a window that it is better to choose our mobile device.
14- In the window that opens, we do not see any information. To see it, we have to touch the page and then see the results.
15- After we touch the page and the information is displayed, we will see that the value of the moving part is 0 because we touched the page once.
16- Tap the screen again and drag your finger on it.
17- We will see that its value has changed because by touching the fingers of the sensor, it notices it and says that multi-touch has been done.
Below we want to create an application that can provide us with a list of sensors in the Android system.
1- I use Eclipse IDE to create an Android application.
2- Name the Sensors in the com.example.sensors package.
3- Modify the src / MainActivity.java file to add a different code.
4- The res/layout / activity_main file must be modified to add the XML component.
5- Change AndroidManifest.xml to get permissions.
6- All contents and code that are fully included in the file and program are as follows:
7- The contents of the res/layout / activity_main.xml file are as follows:
8- The contents of the res/values / string.xml file are as follows:
9- The contents of the AndroidManifest.xml file are as follows:
10- Run the IntentShare program.
11- You must connect your mobile device to the computer beforehand.
12- To run the program from Eclipse, we must open one of the program activity files and click on Run.
13- As a result, we will see that the sensors in the system and mobile are displayed along with their version numbers.
Note:
Running this program will have different outputs on different devices because there are different sensors in the device.
DotNek Android development services