Compare commits
2 Commits
ec9a97c5af
...
363ddad842
| Author | SHA1 | Date |
|---|---|---|
|
|
363ddad842 | |
|
|
65a662a54c |
|
|
@ -31,6 +31,9 @@
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name=".RecuperarSenhaActivity"
|
||||||
|
android:exported="false" />
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|
@ -4,7 +4,6 @@ import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
|
@ -14,6 +13,7 @@ import androidx.core.graphics.Insets;
|
||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.core.view.WindowInsetsCompat;
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
import com.google.android.material.textfield.TextInputEditText;
|
||||||
import com.google.firebase.auth.FirebaseAuth;
|
import com.google.firebase.auth.FirebaseAuth;
|
||||||
|
|
||||||
public class CriarContaActivity extends AppCompatActivity {
|
public class CriarContaActivity extends AppCompatActivity {
|
||||||
|
|
@ -28,9 +28,9 @@ public class CriarContaActivity extends AppCompatActivity {
|
||||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
return insets;
|
return insets;
|
||||||
});
|
});
|
||||||
EditText editPassword2;
|
TextInputEditText editPassword2;
|
||||||
EditText editEmail;
|
TextInputEditText editEmail;
|
||||||
EditText editConfirmPassword;
|
TextInputEditText editConfirmPassword;
|
||||||
Button btnCreateAccount;
|
Button btnCreateAccount;
|
||||||
TextView txtGoLogin;
|
TextView txtGoLogin;
|
||||||
|
|
||||||
|
|
@ -45,7 +45,7 @@ public class CriarContaActivity extends AppCompatActivity {
|
||||||
btnCreateAccount.setOnClickListener(new View.OnClickListener() {
|
btnCreateAccount.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
String email = editEmail.getText().toString();
|
String email = editEmail.getText().toString().trim();
|
||||||
String pass = editPassword2.getText().toString();
|
String pass = editPassword2.getText().toString();
|
||||||
String conf = editConfirmPassword.getText().toString();
|
String conf = editConfirmPassword.getText().toString();
|
||||||
|
|
||||||
|
|
@ -54,6 +54,16 @@ public class CriarContaActivity extends AppCompatActivity {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!android.util.Patterns.EMAIL_ADDRESS.matcher(email).matches()) {
|
||||||
|
Toast.makeText(CriarContaActivity.this, "Por favor, insira um email válido", Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pass.length() < 6) {
|
||||||
|
Toast.makeText(CriarContaActivity.this, "A senha deve ter pelo menos 6 caracteres", Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!pass.equals(conf)) {
|
if (!pass.equals(conf)) {
|
||||||
Toast.makeText(CriarContaActivity.this, "As passwords não coincidem!", Toast.LENGTH_SHORT).show();
|
Toast.makeText(CriarContaActivity.this, "As passwords não coincidem!", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
|
|
@ -62,12 +72,17 @@ public class CriarContaActivity extends AppCompatActivity {
|
||||||
FirebaseAuth auth = FirebaseAuth.getInstance();
|
FirebaseAuth auth = FirebaseAuth.getInstance();
|
||||||
auth.createUserWithEmailAndPassword(email, pass).addOnCompleteListener(CriarContaActivity.this, task -> {
|
auth.createUserWithEmailAndPassword(email, pass).addOnCompleteListener(CriarContaActivity.this, task -> {
|
||||||
if (task.isSuccessful()) {
|
if (task.isSuccessful()) {
|
||||||
|
Toast.makeText(CriarContaActivity.this, "Conta criada com sucesso!", Toast.LENGTH_SHORT).show();
|
||||||
Intent intent= new Intent(CriarContaActivity.this, MainActivity.class);
|
Intent intent= new Intent(CriarContaActivity.this, MainActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
finish();
|
finish();
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(CriarContaActivity.this, "Erro ao criar conta!", Toast.LENGTH_SHORT).show();
|
String errorMessage = task.getException().getMessage();
|
||||||
|
if (errorMessage != null && errorMessage.contains("email")) {
|
||||||
|
Toast.makeText(CriarContaActivity.this, "Este email já está em uso", Toast.LENGTH_SHORT).show();
|
||||||
|
} else {
|
||||||
|
Toast.makeText(CriarContaActivity.this, "Erro ao criar conta: " + errorMessage, Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -3,21 +3,22 @@ package com.example.vdcscore;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.google.android.material.textfield.TextInputEditText;
|
||||||
import com.google.firebase.auth.FirebaseAuth;
|
import com.google.firebase.auth.FirebaseAuth;
|
||||||
|
|
||||||
public class LoginActivity extends AppCompatActivity {
|
public class LoginActivity extends AppCompatActivity {
|
||||||
|
|
||||||
EditText editEmail, editPassword;
|
TextInputEditText editEmail, editPassword;
|
||||||
Button btnLogin;
|
Button btnLogin;
|
||||||
FirebaseAuth mAuth;
|
FirebaseAuth mAuth;
|
||||||
|
|
||||||
private TextView criarContaTextView;
|
private TextView criarContaTextView;
|
||||||
|
private TextView txtForgotPassword;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
|
@ -28,11 +29,13 @@ public class LoginActivity extends AppCompatActivity {
|
||||||
editPassword = findViewById(R.id.editPassword2);
|
editPassword = findViewById(R.id.editPassword2);
|
||||||
btnLogin = findViewById(R.id.btnLogin);
|
btnLogin = findViewById(R.id.btnLogin);
|
||||||
criarContaTextView = findViewById(R.id.txtRegister);
|
criarContaTextView = findViewById(R.id.txtRegister);
|
||||||
|
txtForgotPassword = findViewById(R.id.txtForgotPassword);
|
||||||
|
|
||||||
mAuth = FirebaseAuth.getInstance();
|
mAuth = FirebaseAuth.getInstance();
|
||||||
|
|
||||||
btnLogin.setOnClickListener(v -> loginUser());
|
btnLogin.setOnClickListener(v -> loginUser());
|
||||||
criarContaTextView.setOnClickListener(view -> criarConta());
|
criarContaTextView.setOnClickListener(view -> criarConta());
|
||||||
|
txtForgotPassword.setOnClickListener(view -> recuperarSenha());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void criarConta() {
|
private void criarConta() {
|
||||||
|
|
@ -40,6 +43,11 @@ public class LoginActivity extends AppCompatActivity {
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void recuperarSenha() {
|
||||||
|
Intent intent = new Intent(LoginActivity.this, RecuperarSenhaActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
|
||||||
private void loginUser() {
|
private void loginUser() {
|
||||||
String email = editEmail.getText().toString().trim();
|
String email = editEmail.getText().toString().trim();
|
||||||
String password = editPassword.getText().toString().trim();
|
String password = editPassword.getText().toString().trim();
|
||||||
|
|
@ -49,6 +57,11 @@ public class LoginActivity extends AppCompatActivity {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!android.util.Patterns.EMAIL_ADDRESS.matcher(email).matches()) {
|
||||||
|
Toast.makeText(this, "Por favor, insira um email válido", Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
mAuth.signInWithEmailAndPassword(email, password)
|
mAuth.signInWithEmailAndPassword(email, password)
|
||||||
.addOnCompleteListener(task -> {
|
.addOnCompleteListener(task -> {
|
||||||
if (task.isSuccessful()) {
|
if (task.isSuccessful()) {
|
||||||
|
|
@ -60,9 +73,16 @@ public class LoginActivity extends AppCompatActivity {
|
||||||
finish();
|
finish();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(this,
|
String errorMessage = task.getException().getMessage();
|
||||||
"Erro: " + task.getException().getMessage(),
|
if (errorMessage != null && errorMessage.contains("password")) {
|
||||||
Toast.LENGTH_LONG).show();
|
Toast.makeText(this,
|
||||||
|
"Senha incorreta. Esqueceu a senha?",
|
||||||
|
Toast.LENGTH_LONG).show();
|
||||||
|
} else {
|
||||||
|
Toast.makeText(this,
|
||||||
|
"Erro: " + errorMessage,
|
||||||
|
Toast.LENGTH_LONG).show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,72 @@
|
||||||
|
package com.example.vdcscore;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.google.android.material.textfield.TextInputEditText;
|
||||||
|
import com.google.firebase.auth.FirebaseAuth;
|
||||||
|
|
||||||
|
public class RecuperarSenhaActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
private TextInputEditText editEmailRecover;
|
||||||
|
private Button btnSendRecovery;
|
||||||
|
private TextView txtBackToLogin;
|
||||||
|
private FirebaseAuth mAuth;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_recuperar_senha);
|
||||||
|
|
||||||
|
editEmailRecover = findViewById(R.id.editEmailRecover);
|
||||||
|
btnSendRecovery = findViewById(R.id.btnSendRecovery);
|
||||||
|
txtBackToLogin = findViewById(R.id.txtBackToLogin);
|
||||||
|
|
||||||
|
mAuth = FirebaseAuth.getInstance();
|
||||||
|
|
||||||
|
btnSendRecovery.setOnClickListener(v -> sendRecoveryEmail());
|
||||||
|
txtBackToLogin.setOnClickListener(v -> backToLogin());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendRecoveryEmail() {
|
||||||
|
String email = editEmailRecover.getText().toString().trim();
|
||||||
|
|
||||||
|
if (email.isEmpty()) {
|
||||||
|
Toast.makeText(this, "Por favor, insira o seu email", Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!android.util.Patterns.EMAIL_ADDRESS.matcher(email).matches()) {
|
||||||
|
Toast.makeText(this, "Por favor, insira um email válido", Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mAuth.sendPasswordResetEmail(email)
|
||||||
|
.addOnCompleteListener(task -> {
|
||||||
|
if (task.isSuccessful()) {
|
||||||
|
Toast.makeText(this,
|
||||||
|
"Email de recuperação enviado! Verifique a sua caixa de entrada.",
|
||||||
|
Toast.LENGTH_LONG).show();
|
||||||
|
// Voltar ao login após enviar
|
||||||
|
backToLogin();
|
||||||
|
} else {
|
||||||
|
Toast.makeText(this,
|
||||||
|
"Erro: " + task.getException().getMessage(),
|
||||||
|
Toast.LENGTH_LONG).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void backToLogin() {
|
||||||
|
Intent intent = new Intent(RecuperarSenhaActivity.this, LoginActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<gradient
|
||||||
|
android:angle="135"
|
||||||
|
android:startColor="#667eea"
|
||||||
|
android:centerColor="#764ba2"
|
||||||
|
android:endColor="#f093fb"
|
||||||
|
android:type="linear" />
|
||||||
|
</shape>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<gradient
|
||||||
|
android:angle="90"
|
||||||
|
android:startColor="#667eea"
|
||||||
|
android:endColor="#764ba2"
|
||||||
|
android:type="linear" />
|
||||||
|
<corners android:radius="12dp" />
|
||||||
|
</shape>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="#FFFFFF" />
|
||||||
|
<corners android:radius="12dp" />
|
||||||
|
<stroke
|
||||||
|
android:width="2dp"
|
||||||
|
android:color="#667eea" />
|
||||||
|
<padding
|
||||||
|
android:left="16dp"
|
||||||
|
android:top="16dp"
|
||||||
|
android:right="16dp"
|
||||||
|
android:bottom="16dp" />
|
||||||
|
</shape>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="#FFFFFF" />
|
||||||
|
<corners android:radius="12dp" />
|
||||||
|
<stroke
|
||||||
|
android:width="1dp"
|
||||||
|
android:color="#E0E0E0" />
|
||||||
|
<padding
|
||||||
|
android:left="16dp"
|
||||||
|
android:top="16dp"
|
||||||
|
android:right="16dp"
|
||||||
|
android:bottom="16dp" />
|
||||||
|
</shape>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="#90A4AE">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,8l-8,5 -8,-5L4,6l8,5 8,-5v2z"/>
|
||||||
|
</vector>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="#90A4AE">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM12,17c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM15.1,8L8.9,8L8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2z"/>
|
||||||
|
</vector>
|
||||||
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="#ECEFF1"
|
android:background="@drawable/bg_gradient_login"
|
||||||
android:id="@+id/main">
|
android:id="@+id/main">
|
||||||
|
|
||||||
<!-- Título Criar Conta -->
|
<!-- Título Criar Conta -->
|
||||||
|
|
@ -13,12 +13,13 @@
|
||||||
android:id="@+id/textView"
|
android:id="@+id/textView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="56dp"
|
android:layout_marginTop="60dp"
|
||||||
android:text="Criar Conta"
|
android:text="Criar Conta"
|
||||||
android:textSize="35sp"
|
android:textSize="42sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:letterSpacing="0.1"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.497"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
@ -27,11 +28,11 @@
|
||||||
android:id="@+id/textView4"
|
android:id="@+id/textView4"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="15dp"
|
android:layout_marginTop="8dp"
|
||||||
android:text="VdcScore"
|
android:text="VdcScore"
|
||||||
android:textSize="25sp"
|
android:textSize="18sp"
|
||||||
android:textStyle="bold"
|
android:textColor="#FFFFFF"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/cardRegister"
|
android:alpha="0.9"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textView" />
|
app:layout_constraintTop_toBottomOf="@+id/textView" />
|
||||||
|
|
@ -41,92 +42,172 @@
|
||||||
android:id="@+id/cardRegister"
|
android:id="@+id/cardRegister"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="24dp"
|
||||||
android:elevation="10dp"
|
android:elevation="16dp"
|
||||||
android:padding="24dp"
|
android:padding="0dp"
|
||||||
app:cardCornerRadius="18dp"
|
app:cardCornerRadius="24dp"
|
||||||
app:cardUseCompatPadding="true"
|
app:cardUseCompatPadding="true"
|
||||||
|
app:cardBackgroundColor="#FFFFFF"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@+id/textView4"
|
||||||
android:layout_marginTop="80dp">
|
android:layout_marginTop="48dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
android:padding="32dp">
|
||||||
|
|
||||||
<!-- Nome -->
|
<!-- Título do Card -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Registar"
|
||||||
|
android:textSize="28sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="#263238"
|
||||||
|
android:layout_marginBottom="8dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Cria a tua conta para começar"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textColor="#90A4AE"
|
||||||
|
android:layout_marginBottom="24dp" />
|
||||||
|
|
||||||
<!-- Email -->
|
<!-- Email -->
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/editEmail"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="12dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:background="@android:drawable/edit_text"
|
|
||||||
android:drawableLeft="@android:drawable/ic_menu_send"
|
|
||||||
android:hint="Email"
|
android:hint="Email"
|
||||||
android:padding="12dp"
|
app:boxStrokeColor="#667eea"
|
||||||
android:textColor="#263238"
|
app:hintTextColor="#667eea"
|
||||||
android:textColorHint="#90A4AE" />
|
app:startIconDrawable="@drawable/ic_email"
|
||||||
|
app:startIconTint="#667eea"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/editEmail"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="textEmailAddress"
|
||||||
|
android:textColor="#263238"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<!-- Password -->
|
<!-- Password -->
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/editPassword2"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="12dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:background="@android:drawable/edit_text"
|
|
||||||
android:drawableLeft="@android:drawable/ic_lock_lock"
|
|
||||||
android:hint="Password"
|
android:hint="Password"
|
||||||
android:inputType="textPassword"
|
app:boxStrokeColor="#667eea"
|
||||||
android:padding="12dp"
|
app:hintTextColor="#667eea"
|
||||||
android:textColor="#263238"
|
app:startIconDrawable="@drawable/ic_lock"
|
||||||
android:textColorHint="#90A4AE" />
|
app:startIconTint="#667eea"
|
||||||
|
app:endIconMode="password_toggle"
|
||||||
|
app:endIconTint="#667eea"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/editPassword2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:textColor="#263238"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<!-- Confirmar Password -->
|
<!-- Confirmar Password -->
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/editConfirmPassword"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="18dp"
|
android:layout_marginBottom="24dp"
|
||||||
android:background="@android:drawable/edit_text"
|
|
||||||
android:drawableLeft="@android:drawable/ic_lock_lock"
|
|
||||||
android:hint="Confirmar Password"
|
android:hint="Confirmar Password"
|
||||||
android:inputType="textPassword"
|
app:boxStrokeColor="#667eea"
|
||||||
android:padding="12dp"
|
app:hintTextColor="#667eea"
|
||||||
android:textColor="#263238"
|
app:startIconDrawable="@drawable/ic_lock"
|
||||||
android:textColorHint="#90A4AE" />
|
app:startIconTint="#667eea"
|
||||||
|
app:endIconMode="password_toggle"
|
||||||
|
app:endIconTint="#667eea"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/editConfirmPassword"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:textColor="#263238"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<!-- Botão -->
|
<!-- Botão -->
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btnCreateAccount"
|
android:id="@+id/btnCreateAccount"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="56dp"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginBottom="10dp"
|
android:background="@drawable/button_modern"
|
||||||
android:backgroundTint="#1E88E5"
|
|
||||||
android:padding="12dp"
|
|
||||||
android:text="Criar Conta"
|
android:text="Criar Conta"
|
||||||
android:textColor="#FFFFFF" />
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:elevation="4dp"
|
||||||
|
android:stateListAnimator="@null" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<!-- Voltar ao Login -->
|
<!-- Voltar ao Login -->
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/txtGoLogin"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:orientation="horizontal"
|
||||||
android:text="Já tens conta? Entrar"
|
android:layout_marginTop="24dp"
|
||||||
android:textColor="#1E88E5"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/cardRegister" />
|
app:layout_constraintTop_toBottomOf="@+id/cardRegister">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Já tens conta? "
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:alpha="0.9" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txtGoLogin"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Entrar"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:padding="4dp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
||||||
|
|
@ -5,97 +5,195 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="#ECEFF1">
|
android:background="@drawable/bg_gradient_login">
|
||||||
|
|
||||||
|
<!-- Título VdcScore -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="80dp"
|
||||||
|
android:text="VdcScore"
|
||||||
|
android:textSize="42sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:letterSpacing="0.1"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<!-- Subtítulo -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewSubtitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:text="Bem-vindo de volta!"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:alpha="0.9"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView3" />
|
||||||
|
|
||||||
<!-- Card -->
|
<!-- Card -->
|
||||||
|
|
||||||
<!-- Texto "Criar conta" -->
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:id="@+id/cardLogin"
|
android:id="@+id/cardLogin"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="24dp"
|
||||||
android:elevation="10dp"
|
android:elevation="16dp"
|
||||||
android:padding="24dp"
|
android:padding="0dp"
|
||||||
app:cardCornerRadius="18dp"
|
app:cardCornerRadius="24dp"
|
||||||
app:cardUseCompatPadding="true"
|
app:cardUseCompatPadding="true"
|
||||||
|
app:cardBackgroundColor="#FFFFFF"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
android:layout_marginTop="140dp"
|
app:layout_constraintTop_toBottomOf="@+id/textViewSubtitle"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
android:layout_marginTop="48dp">
|
||||||
>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
android:padding="32dp">
|
||||||
|
|
||||||
|
<!-- Título do Card -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Entrar"
|
||||||
|
android:textSize="28sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="#263238"
|
||||||
|
android:layout_marginBottom="8dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Insira as suas credenciais"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textColor="#90A4AE"
|
||||||
|
android:layout_marginBottom="24dp" />
|
||||||
|
|
||||||
<!-- Email -->
|
<!-- Email -->
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/editEmail"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="12dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:background="@android:drawable/edit_text"
|
|
||||||
android:drawableLeft="@android:drawable/ic_menu_send"
|
|
||||||
android:hint="Email"
|
android:hint="Email"
|
||||||
android:padding="12dp"
|
app:boxStrokeColor="#667eea"
|
||||||
android:textColor="#263238"
|
app:hintTextColor="#667eea"
|
||||||
android:textColorHint="#90A4AE" />
|
app:startIconDrawable="@drawable/ic_email"
|
||||||
|
app:startIconTint="#667eea"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/editEmail"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="textEmailAddress"
|
||||||
|
android:textColor="#263238"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<!-- Password -->
|
<!-- Password -->
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/editPassword2"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="18dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:background="@android:drawable/edit_text"
|
|
||||||
android:drawableLeft="@android:drawable/ic_lock_lock"
|
|
||||||
android:hint="Password"
|
android:hint="Password"
|
||||||
android:inputType="textPassword"
|
app:boxStrokeColor="#667eea"
|
||||||
android:padding="12dp"
|
app:hintTextColor="#667eea"
|
||||||
android:textColor="#263238"
|
app:startIconDrawable="@drawable/ic_lock"
|
||||||
android:textColorHint="#90A4AE" />
|
app:startIconTint="#667eea"
|
||||||
|
app:endIconMode="password_toggle"
|
||||||
|
app:endIconTint="#667eea"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/editPassword2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:textColor="#263238"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<!-- Esqueceu a senha -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txtForgotPassword"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:text="Esqueceu a senha?"
|
||||||
|
android:textColor="#667eea"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:layout_marginBottom="24dp" />
|
||||||
|
|
||||||
<!-- Botão -->
|
<!-- Botão -->
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btnLogin"
|
android:id="@+id/btnLogin"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="56dp"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginBottom="10dp"
|
android:background="@drawable/button_modern"
|
||||||
android:backgroundTint="#1E88E5"
|
|
||||||
android:padding="12dp"
|
|
||||||
android:text="Entrar"
|
android:text="Entrar"
|
||||||
android:textColor="#FFFFFF" />
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:elevation="4dp"
|
||||||
|
android:stateListAnimator="@null" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<TextView
|
<!-- Criar conta -->
|
||||||
android:id="@+id/txtRegister"
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="30dp"
|
android:orientation="horizontal"
|
||||||
android:text="Criar conta"
|
android:layout_marginTop="24dp"
|
||||||
android:textColor="#1E88E5"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/cardLogin" />
|
app:layout_constraintTop_toBottomOf="@+id/cardLogin">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView3"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:text="Não tens conta? "
|
||||||
android:layout_marginBottom="50dp"
|
android:textColor="#FFFFFF"
|
||||||
android:text="VdcScore"
|
android:textSize="14sp"
|
||||||
android:textSize="25sp"
|
android:alpha="0.9" />
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/cardLogin"
|
<TextView
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:id="@+id/txtRegister"
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Criar conta"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:padding="4dp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,143 @@
|
||||||
|
<?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:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/bg_gradient_login">
|
||||||
|
|
||||||
|
<!-- Título -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="100dp"
|
||||||
|
android:text="Recuperar Senha"
|
||||||
|
android:textSize="42sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:letterSpacing="0.1"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<!-- Subtítulo -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewSubtitle"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="32dp"
|
||||||
|
android:layout_marginEnd="32dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="Insira o seu email e enviaremos um link para redefinir a sua senha"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:alpha="0.9"
|
||||||
|
android:gravity="center"
|
||||||
|
android:lineSpacingExtra="4dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textViewTitle" />
|
||||||
|
|
||||||
|
<!-- Card -->
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:id="@+id/cardRecover"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="24dp"
|
||||||
|
android:elevation="16dp"
|
||||||
|
android:padding="0dp"
|
||||||
|
app:cardCornerRadius="24dp"
|
||||||
|
app:cardUseCompatPadding="true"
|
||||||
|
app:cardBackgroundColor="#FFFFFF"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textViewSubtitle"
|
||||||
|
android:layout_marginTop="48dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="32dp">
|
||||||
|
|
||||||
|
<!-- Email -->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="24dp"
|
||||||
|
android:hint="Email"
|
||||||
|
app:boxStrokeColor="#667eea"
|
||||||
|
app:hintTextColor="#667eea"
|
||||||
|
app:startIconDrawable="@drawable/ic_email"
|
||||||
|
app:startIconTint="#667eea"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/editEmailRecover"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="textEmailAddress"
|
||||||
|
android:textColor="#263238"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<!-- Botão -->
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnSendRecovery"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:background="@drawable/button_modern"
|
||||||
|
android:text="Enviar Link de Recuperação"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:elevation="4dp"
|
||||||
|
android:stateListAnimator="@null" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
<!-- Voltar ao Login -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/cardRecover">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Lembras-te da senha? "
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:alpha="0.9" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txtBackToLogin"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Voltar ao Login"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:padding="4dp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
Loading…
Reference in New Issue