diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aa724b7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 0000000..f441e98 --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,43 @@ +plugins { + alias(libs.plugins.android.application) +} + +android { + namespace = "com.example.finzora" + compileSdk = 36 + + defaultConfig { + applicationId = "com.example.finzora" + minSdk = 24 + targetSdk = 36 + versionCode = 1 + versionName = "1.0" + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } +} + +dependencies { + + implementation(libs.appcompat) + implementation(libs.material) + implementation(libs.activity) + implementation(libs.constraintlayout) + testImplementation(libs.junit) + androidTestImplementation(libs.ext.junit) + androidTestImplementation(libs.espresso.core) +} \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/app/src/androidTest/java/com/example/finzora/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/example/finzora/ExampleInstrumentedTest.java new file mode 100644 index 0000000..c3f4ba3 --- /dev/null +++ b/app/src/androidTest/java/com/example/finzora/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.finzora; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.example.finzora", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..5cce8b9 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/com/example/finzora/HomeActivity.java b/app/src/main/java/com/example/finzora/HomeActivity.java new file mode 100644 index 0000000..c2fcd97 --- /dev/null +++ b/app/src/main/java/com/example/finzora/HomeActivity.java @@ -0,0 +1,11 @@ +package com.example.finzora; + +import android.os.Bundle; + +public class HomeActivity { + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_home); + } +} diff --git a/app/src/main/java/com/example/finzora/MainActivity.java b/app/src/main/java/com/example/finzora/MainActivity.java new file mode 100644 index 0000000..3cc27f9 --- /dev/null +++ b/app/src/main/java/com/example/finzora/MainActivity.java @@ -0,0 +1,57 @@ +package com.example.finzora; + +import androidx.appcompat.app.AppCompatActivity; +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; +import android.widget.EditText; +import android.widget.Toast; + +public class MainActivity extends AppCompatActivity { + + EditText inputEmail, inputPassword; + Button btnLogin; + + // Credenciais de exemplo (podes mudar) + private final String USER_EMAIL = "admin@gmail.com"; + private final String USER_PASSWORD = "123456"; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + inputEmail = findViewById(R.id.inputEmail); + inputPassword = findViewById(R.id.inputPassword); + btnLogin = findViewById(R.id.btnLogin); + + btnLogin.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + String email = inputEmail.getText().toString().trim(); + String password = inputPassword.getText().toString().trim(); + + if (email.isEmpty() || password.isEmpty()) { + Toast.makeText(MainActivity.this, "Preencha todos os campos", Toast.LENGTH_SHORT).show(); + return; + } + + // Verificação simples + if (email.equals(USER_EMAIL) && password.equals(USER_PASSWORD)) { + + Toast.makeText(MainActivity.this, "Login efetuado!", Toast.LENGTH_SHORT).show(); + + // Ir para a próxima página + Intent intent = new Intent(MainActivity.this, HomeActivity.class); + startActivity(intent); + finish(); + + } else { + Toast.makeText(MainActivity.this, "Email ou palavra-passe incorretos", Toast.LENGTH_SHORT).show(); + } + } + }); + + } +} diff --git a/app/src/main/res/drawable/chatgpt_image_19_11_2025__09_06_49.png b/app/src/main/res/drawable/chatgpt_image_19_11_2025__09_06_49.png new file mode 100644 index 0000000..c1982eb Binary files /dev/null and b/app/src/main/res/drawable/chatgpt_image_19_11_2025__09_06_49.png differ diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_home.xml b/app/src/main/res/layout/activity_home.xml new file mode 100644 index 0000000..77d9ef6 --- /dev/null +++ b/app/src/main/res/layout/activity_home.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..1444a34 --- /dev/null +++ b/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + +