Compare commits
2 Commits
968c9190d7
...
6751119d89
| Author | SHA1 | Date |
|---|---|---|
|
|
6751119d89 | |
|
|
68d4dc9149 |
|
|
@ -0,0 +1 @@
|
|||
cuida+
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AndroidProjectSystem">
|
||||
<option name="providerId" value="com.android.tools.idea.GradleProjectSystem" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AppInsightsSettings">
|
||||
<option name="tabSettings">
|
||||
<map>
|
||||
<entry key="Firebase Crashlytics">
|
||||
<value>
|
||||
<InsightsFilterSettings>
|
||||
<option name="connection">
|
||||
<ConnectionSetting>
|
||||
<option name="appId" value="com.example.cuida" />
|
||||
<option name="mobileSdkAppId" value="1:42675605100:android:664a806c688e287a4b5249" />
|
||||
<option name="projectId" value="cuida-7d841" />
|
||||
<option name="projectNumber" value="42675605100" />
|
||||
</ConnectionSetting>
|
||||
</option>
|
||||
<option name="signal" value="SIGNAL_UNSPECIFIED" />
|
||||
<option name="timeIntervalDays" value="THIRTY_DAYS" />
|
||||
<option name="visibilityType" value="ALL" />
|
||||
</InsightsFilterSettings>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="21" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetSelector">
|
||||
<selectionStates>
|
||||
<SelectionState runConfigName="app">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
</SelectionState>
|
||||
</selectionStates>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="testRunner" value="CHOOSE_PER_TEST" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectMigrations">
|
||||
<option name="MigrateToGradleLocalJavaHome">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="Android" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" />
|
||||
<option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" />
|
||||
<option value="com.intellij.execution.junit.PatternConfigurationProducer" />
|
||||
<option value="com.intellij.execution.junit.TestInClassConfigurationProducer" />
|
||||
<option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" />
|
||||
<option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" />
|
||||
<option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" />
|
||||
<option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.google.gms.google.services)
|
||||
}
|
||||
|
||||
android {
|
||||
|
|
@ -44,6 +45,13 @@ dependencies {
|
|||
implementation(libs.navigation.fragment)
|
||||
implementation(libs.navigation.ui)
|
||||
implementation(libs.activity)
|
||||
implementation(libs.firebase.ai)
|
||||
implementation(libs.camera.camera2.pipe)
|
||||
implementation(libs.firebase.auth)
|
||||
implementation(libs.credentials)
|
||||
implementation(libs.credentials.play.services.auth)
|
||||
implementation(libs.googleid)
|
||||
implementation(libs.mediarouter)
|
||||
testImplementation(libs.junit)
|
||||
androidTestImplementation(libs.ext.junit)
|
||||
androidTestImplementation(libs.espresso.core)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"project_info": {
|
||||
"project_number": "42675605100",
|
||||
"project_id": "cuida-7d841",
|
||||
"storage_bucket": "cuida-7d841.firebasestorage.app"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:42675605100:android:664a806c688e287a4b5249",
|
||||
"android_client_info": {
|
||||
"package_name": "com.example.cuida"
|
||||
}
|
||||
},
|
||||
"oauth_client": [],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyClxXOWuzwdwPQFAyka7uXkJVpaJ_EylAE"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
|
|
@ -12,10 +12,16 @@
|
|||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.Cuida" >
|
||||
<activity
|
||||
android:name=".ui.iniciar_sessao"
|
||||
android:name=".ui.Inicial.Esqueci_a_palavra_passe"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:name=".ui.Inicial.Criar_conta"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".ui.Inicial.iniciar_sessao"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".ui.MainActivity"
|
||||
android:exported="true"
|
||||
android:label="@string/app_name" >
|
||||
<intent-filter>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.cuida.ui;
|
||||
package com.example.cuida.ui.Inicial;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
|
|
@ -10,13 +10,13 @@ import androidx.core.view.WindowInsetsCompat;
|
|||
|
||||
import com.example.cuida.R;
|
||||
|
||||
public class iniciar_sessao extends AppCompatActivity {
|
||||
public class Criar_conta extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
EdgeToEdge.enable(this);
|
||||
setContentView(R.layout.activity_iniciar_sessao);
|
||||
setContentView(R.layout.activity_criar_conta);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package com.example.cuida.ui.Inicial;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import com.example.cuida.R;
|
||||
|
||||
public class Esqueci_a_palavra_passe extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
EdgeToEdge.enable(this);
|
||||
setContentView(R.layout.activity_esqueci_apalavra_passe);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
package com.example.cuida.ui.Inicial;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import com.example.cuida.R;
|
||||
import com.example.cuida.ui.MainActivity;
|
||||
import com.google.android.gms.tasks.OnCompleteListener;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.firebase.auth.AuthResult;
|
||||
import com.google.firebase.auth.FirebaseAuth;
|
||||
|
||||
public class iniciar_sessao extends AppCompatActivity {
|
||||
private ImageView imageView;
|
||||
private EditText emailEditText;
|
||||
private EditText palavraPasseEditText;
|
||||
private Button entrarButton;
|
||||
private Button criarContaButton;
|
||||
private TextView bemVindoTextView;
|
||||
private Button esqueciAPalavraPasseButton;
|
||||
|
||||
private FirebaseAuth mAuth;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
EdgeToEdge.enable(this);
|
||||
setContentView(R.layout.activity_iniciar_sessao);
|
||||
|
||||
// Inicializar Firebase Auth
|
||||
mAuth = FirebaseAuth.getInstance();
|
||||
|
||||
// Configuração do layout para Edge-to-Edge
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
|
||||
// Associar as Views
|
||||
imageView = findViewById(R.id.imageView);
|
||||
emailEditText = findViewById(R.id.emailEditText);
|
||||
palavraPasseEditText = findViewById(R.id.palavraPasseEditText);
|
||||
entrarButton = findViewById(R.id.entarButton);
|
||||
criarContaButton = findViewById(R.id.criarContaButton);
|
||||
bemVindoTextView = findViewById(R.id.bemVindoTextView);
|
||||
|
||||
// Definir o listener para o botão de criar conta
|
||||
criarContaButton.setOnClickListener(v -> {
|
||||
// Chama o método para criar a conta
|
||||
criarConta();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Método para criar uma nova conta de utilizador.
|
||||
*/
|
||||
private void criarConta() {
|
||||
String email = emailEditText.getText().toString().trim();
|
||||
String password = palavraPasseEditText.getText().toString().trim();
|
||||
|
||||
// 1. Validar as entradas do utilizador
|
||||
if (email.isEmpty()) {
|
||||
emailEditText.setError("O e-mail é obrigatório");
|
||||
emailEditText.requestFocus();
|
||||
return;
|
||||
}
|
||||
|
||||
if (password.isEmpty()) {
|
||||
palavraPasseEditText.setError("A palavra-passe é obrigatória");
|
||||
palavraPasseEditText.requestFocus();
|
||||
return;
|
||||
}
|
||||
|
||||
if (password.length() < 6) {
|
||||
palavraPasseEditText.setError("A palavra-passe deve ter no mínimo 6 caracteres");
|
||||
palavraPasseEditText.requestFocus();
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. Criar o utilizador no Firebase
|
||||
mAuth.createUserWithEmailAndPassword(email, password)
|
||||
.addOnCompleteListener(this, task -> {
|
||||
if (task.isSuccessful()) {
|
||||
// Se o registo for bem-sucedido
|
||||
Log.d("FIREBASE_AUTH", "createUserWithEmail:success");
|
||||
Toast.makeText(iniciar_sessao.this, "Conta criada com sucesso.", Toast.LENGTH_SHORT).show();
|
||||
|
||||
// Navega para a MainActivity
|
||||
navegarParaMainActivity();
|
||||
|
||||
} else {
|
||||
// Se o registo falhar
|
||||
Log.w("FIREBASE_AUTH", "createUserWithEmail:failure", task.getException());
|
||||
// Mostra uma mensagem de erro mais específica
|
||||
String errorMessage = task.getException() != null ? task.getException().getMessage() : "Erro desconhecido.";
|
||||
Toast.makeText(iniciar_sessao.this, "Falha na autenticação: " + errorMessage, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Navega para a MainActivity e limpa a pilha de atividades.
|
||||
*/
|
||||
private void navegarParaMainActivity() {
|
||||
Intent intent = new Intent(iniciar_sessao.this, MainActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
startActivity(intent);
|
||||
finish(); // Finaliza a atividade atual
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
package com.example.cuida;
|
||||
package com.example.cuida.ui;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.example.cuida.R;
|
||||
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
|
@ -27,7 +28,7 @@ public class MainActivity extends AppCompatActivity {
|
|||
// Passing each menu ID as a set of Ids because each
|
||||
// menu should be considered as top level destinations.
|
||||
AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(
|
||||
R.id.navigation_home, R.id.navigation_dashboard, R.id.navigation_notifications)
|
||||
R.id.navigation_inicio, R.id.navigation_dashboard, R.id.navigation_notifications)
|
||||
.build();
|
||||
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment_activity_main);
|
||||
NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration);
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ui.Inicial.Criar_conta">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Criar conta"
|
||||
android:textColor="#020202"
|
||||
android:textSize="34sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ui.Inicial.Esqueci_a_palavra_passe">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -5,6 +5,103 @@
|
|||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ui.iniciar_sessao">
|
||||
tools:context=".ui.Inicial.iniciar_sessao">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="100dp"
|
||||
android:layout_marginTop="48dp"
|
||||
android:layout_marginEnd="100dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.493"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:srcCompat="@tools:sample/avatars" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/emailEditText"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginStart="100dp"
|
||||
android:layout_marginTop="112dp"
|
||||
android:layout_marginEnd="100dp"
|
||||
android:ems="10"
|
||||
android:hint="Email"
|
||||
android:inputType="textEmailAddress"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.505"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/palavraPasseEditText"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginStart="100dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="100dp"
|
||||
android:ems="10"
|
||||
android:hint="Palavra-Passe"
|
||||
android:inputType="textPassword"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.505"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/emailEditText" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/entarButton"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginStart="100dp"
|
||||
android:layout_marginTop="44dp"
|
||||
android:layout_marginEnd="100dp"
|
||||
android:background="#2196F3"
|
||||
android:backgroundTint="#000000"
|
||||
android:shadowColor="#03A9F4"
|
||||
android:text="Entrar"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textColorHighlight="#03A9F4"
|
||||
android:textColorHint="#03A9F4"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.515"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/palavraPasseEditText"
|
||||
app:rippleColor="#03A9F4"
|
||||
app:strokeColor="#03A9F4" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/esqueciAPalavraPasseButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Esqueci a Palavra-Passe"
|
||||
android:textColor="#03A9F4"
|
||||
app:layout_constraintEnd_toEndOf="@+id/palavraPasseEditText"
|
||||
app:layout_constraintHorizontal_bias="0.993"
|
||||
app:layout_constraintStart_toStartOf="@+id/palavraPasseEditText"
|
||||
app:layout_constraintTop_toBottomOf="@+id/palavraPasseEditText" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/criarContaButton"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:backgroundTint="#FFFFFF"
|
||||
android:text="Criar conta"
|
||||
app:layout_constraintEnd_toEndOf="@+id/entarButton"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="@+id/entarButton"
|
||||
app:layout_constraintTop_toBottomOf="@+id/entarButton" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bemVindoTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="BEM VINDO"
|
||||
android:textSize="34sp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/imageView"
|
||||
app:layout_constraintStart_toStartOf="@+id/imageView"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -30,4 +30,5 @@
|
|||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navGraph="@navigation/mobile_navigation" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:id="@+id/navigation_home"
|
||||
android:id="@+id/navigation_inicio"
|
||||
android:icon="@drawable/ic_home_black_24dp"
|
||||
android:title="@string/title_home" />
|
||||
|
||||
<item
|
||||
android:id="@+id/app_bar_search"
|
||||
android:icon="@drawable/ic_search_black_24dp"
|
||||
android:title="Search"
|
||||
app:actionViewClass="android.widget.SearchView" />
|
||||
<item
|
||||
android:id="@+id/navigation_dashboard"
|
||||
android:icon="@drawable/ic_dashboard_black_24dp"
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/mobile_navigation"
|
||||
app:startDestination="@+id/navigation_home">
|
||||
app:startDestination="@+id/navigation_inicio">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/navigation_home"
|
||||
android:id="@+id/navigation_inicio"
|
||||
android:name="com.example.cuida.ui.home.HomeFragment"
|
||||
android:label="@string/title_home"
|
||||
tools:layout="@layout/fragment_home" />
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
plugins {
|
||||
alias(libs.plugins.android.application) apply false
|
||||
alias(libs.plugins.google.gms.google.services) apply false
|
||||
}
|
||||
|
|
@ -11,6 +11,14 @@ lifecycleViewmodelKtx = "2.6.1"
|
|||
navigationFragment = "2.6.0"
|
||||
navigationUi = "2.6.0"
|
||||
activity = "1.11.0"
|
||||
googleGmsGoogleServices = "4.4.4"
|
||||
firebaseAi = "17.6.0"
|
||||
cameraCamera2Pipe = "1.6.0-alpha01"
|
||||
firebaseAuth = "24.0.1"
|
||||
credentials = "1.5.0"
|
||||
credentialsPlayServicesAuth = "1.5.0"
|
||||
googleid = "1.1.1"
|
||||
mediarouter = "1.8.1"
|
||||
|
||||
[libraries]
|
||||
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
||||
|
|
@ -24,7 +32,15 @@ lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-view
|
|||
navigation-fragment = { group = "androidx.navigation", name = "navigation-fragment", version.ref = "navigationFragment" }
|
||||
navigation-ui = { group = "androidx.navigation", name = "navigation-ui", version.ref = "navigationUi" }
|
||||
activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
|
||||
firebase-ai = { group = "com.google.firebase", name = "firebase-ai", version.ref = "firebaseAi" }
|
||||
camera-camera2-pipe = { group = "androidx.camera", name = "camera-camera2-pipe", version.ref = "cameraCamera2Pipe" }
|
||||
firebase-auth = { group = "com.google.firebase", name = "firebase-auth", version.ref = "firebaseAuth" }
|
||||
credentials = { group = "androidx.credentials", name = "credentials", version.ref = "credentials" }
|
||||
credentials-play-services-auth = { group = "androidx.credentials", name = "credentials-play-services-auth", version.ref = "credentialsPlayServicesAuth" }
|
||||
googleid = { group = "com.google.android.libraries.identity.googleid", name = "googleid", version.ref = "googleid" }
|
||||
mediarouter = { group = "androidx.mediarouter", name = "mediarouter", version.ref = "mediarouter" }
|
||||
|
||||
[plugins]
|
||||
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||
google-gms-google-services = { id = "com.google.gms.google-services", version.ref = "googleGmsGoogleServices" }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue