The login screen is the entry point of ThunderRAR and the first screen employees see when the app launches. It is implemented byDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Viruz7w7/thunderRAR/llms.txt
Use this file to discover all available pages before exploring further.
MainActivity and declared as the launcher activity in AndroidManifest.xml. From here, authenticated employees are routed to the main business menu, guest users can enter the client mode without credentials, and new employees can navigate to the registration screen to create an account.
UI Elements
The login screen is built with aConstraintLayout over a full-bleed background image (fondo_pantalla_inico) and is composed of the following elements:
| Element | ID / Type | Description |
|---|---|---|
| App logo | imageView / ShapeableImageView | Circular-cropped application icon (icon_aplicacion) displayed at the top centre of the screen. |
| App name label | textView8 / TextView | Displays the string ThunderRAR in white at 20 sp, centred beneath the logo. |
| Welcome text | textView9 / TextView | Displays ¡Bienvenido a ThunderRAR! in white at 19 sp, directly below the app name. |
| Employee field label | textView2 / TextView | Displays "Ingrese su correo de empleado:" in white at 20 sp, above the username field. |
| Employee email / username field | txt_usuario / EditText | Accepts free text input (inputType="text"). Placeholder hint: USUARIO. White underline indicator. |
| Password field | txt_password / EditText | Accepts secret input (inputType="textPassword"). Placeholder hint: CONTRASEÑA. White underline indicator. |
| INICIAR SESION button | button2 / Button | Blue background (#3B4FFF), white text. Triggers inicioSesion(View) on click. |
| SOY CLIENTE button | button5 / Button | Yellow background (#FFEB3B), black text. Triggers cliente(View) on click. |
| REGISTRARSE button | button / Button | Red background (#FF0000), black text. Triggers registro(View) on click. |
| Contact label | textView10 / TextView | Reads “Si tienes unas consultas contactanos por esos medios:” in white at 16 sp. |
| GitHub ImageButton | btGithub / ImageButton | Opens the project GitHub repository in a browser. |
| WhatsApp ImageButton | btWhatsapp / ImageButton | Opens a WhatsApp chat link in a browser or the WhatsApp app. |
| Autónoma ImageButton | btAutonoma / ImageButton | Opens the Universidad Autónoma del Perú website. |
Login Logic
When the employee presses INICIAR SESION, theinicioSesion(View) method in MainActivity runs the following validation chain:
Check for registration data
The method checks whether the
datoUsuarioRecibido and dato2PasswordRecibido fields are non-null. These are populated from Intent extras "dato" and "dato2" that arrive from the registration screen. If either is null, a Toast prompts the user to register first and the method returns early.Validate non-empty input
If either the username or password field is empty, a Toast asking the user to fill both fields is shown and the method returns early.
MainActivity.java
External Link Buttons
MainActivity implements View.OnClickListener to handle the three contact ImageButton widgets. When tapped, each button fires an Intent.ACTION_VIEW with a specific URL. The URLs are declared as private static final constants at the top of the class:
MainActivity.java
onClick(View) method resolves the tapped button by view ID, sets the matching URL on the Intent, and calls startActivity. If no app on the device can handle the URL scheme, a fallback Toast is shown instead:
MainActivity.java
AndroidManifest.xml also includes <queries> entries for https and http schemes as well as a <package> entry for com.whatsapp, ensuring the intent resolution check works correctly on Android 11 and later.
Navigation
The login screen is the root of the app navigation graph. The three action buttons lead to:| Button | Handler method | Destination |
|---|---|---|
| INICIAR SESION | inicioSesion(View) | Activity_menu — only on successful credential match |
| SOY CLIENTE | cliente(View) | activity_cliente — guest access, no credentials required |
| REGISTRARSE | registro(View) | activity_registro — account creation flow |
MainActivity.java