Compare commits
No commits in common. "66d019d9b64ad59169133fcf15362d36277627fe" and "f8cc655f74c9d7925a8d223399db5d0bcac04b6a" have entirely different histories.
66d019d9b6
...
f8cc655f74
|
|
@ -46,7 +46,6 @@ dependencies {
|
||||||
implementation(libs.credentials.play.services.auth)
|
implementation(libs.credentials.play.services.auth)
|
||||||
implementation(libs.googleid)
|
implementation(libs.googleid)
|
||||||
implementation(libs.firebase.database)
|
implementation(libs.firebase.database)
|
||||||
implementation(libs.firebase.storage)
|
|
||||||
implementation(libs.lifecycle.livedata.ktx)
|
implementation(libs.lifecycle.livedata.ktx)
|
||||||
implementation(libs.lifecycle.viewmodel.ktx)
|
implementation(libs.lifecycle.viewmodel.ktx)
|
||||||
implementation(libs.navigation.fragment)
|
implementation(libs.navigation.fragment)
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,6 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
|
||||||
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
|
|
||||||
<uses-permission android:name="android.permission.CAMERA" />
|
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||||
|
|
|
||||||
|
|
@ -45,9 +45,9 @@ 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().trim();
|
String email = editEmail.getText().toString();
|
||||||
String pass = editPassword2.getText().toString().trim();
|
String pass = editPassword2.getText().toString();
|
||||||
String conf = editConfirmPassword.getText().toString().trim();
|
String conf = editConfirmPassword.getText().toString();
|
||||||
|
|
||||||
if (email.isEmpty() || pass.isEmpty() || conf.isEmpty()) {
|
if (email.isEmpty() || pass.isEmpty() || conf.isEmpty()) {
|
||||||
Toast.makeText(CriarContaActivity.this, "Preencha todos os campos!", Toast.LENGTH_SHORT).show();
|
Toast.makeText(CriarContaActivity.this, "Preencha todos os campos!", Toast.LENGTH_SHORT).show();
|
||||||
|
|
@ -67,11 +67,7 @@ public class CriarContaActivity extends AppCompatActivity {
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
finish();
|
finish();
|
||||||
} else {
|
} else {
|
||||||
String errorMessage = "Erro ao criar conta!";
|
Toast.makeText(CriarContaActivity.this, "Erro ao criar conta!", Toast.LENGTH_SHORT).show();
|
||||||
if (task.getException() != null && task.getException().getMessage() != null) {
|
|
||||||
errorMessage = "Erro: " + task.getException().getMessage();
|
|
||||||
}
|
|
||||||
Toast.makeText(CriarContaActivity.this, errorMessage, Toast.LENGTH_LONG).show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -68,11 +68,9 @@ public class LoginActivity extends AppCompatActivity {
|
||||||
finish();
|
finish();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
String errorMessage = "Erro ao fazer login!";
|
Toast.makeText(this,
|
||||||
if (task.getException() != null && task.getException().getMessage() != null) {
|
"Erro: " + task.getException().getMessage(),
|
||||||
errorMessage = "Erro: " + task.getException().getMessage();
|
Toast.LENGTH_LONG).show();
|
||||||
}
|
|
||||||
Toast.makeText(this, errorMessage, Toast.LENGTH_LONG).show();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,11 +59,9 @@ public class RecuperarPasswordActivity extends AppCompatActivity {
|
||||||
Toast.LENGTH_LONG).show();
|
Toast.LENGTH_LONG).show();
|
||||||
voltarLogin();
|
voltarLogin();
|
||||||
} else {
|
} else {
|
||||||
String errorMessage = "Erro ao enviar email de recuperação!";
|
Toast.makeText(this,
|
||||||
if (task.getException() != null && task.getException().getMessage() != null) {
|
"Erro: " + task.getException().getMessage(),
|
||||||
errorMessage = "Erro: " + task.getException().getMessage();
|
Toast.LENGTH_LONG).show();
|
||||||
}
|
|
||||||
Toast.makeText(this, errorMessage, Toast.LENGTH_LONG).show();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,320 +1,26 @@
|
||||||
package com.example.vdcscore.ui.definicoes;
|
package com.example.vdcscore.ui.definicoes;
|
||||||
|
|
||||||
import android.Manifest;
|
|
||||||
import android.app.ProgressDialog;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.content.pm.PackageManager;
|
|
||||||
import android.graphics.Bitmap;
|
|
||||||
import android.graphics.BitmapFactory;
|
|
||||||
import android.net.Uri;
|
|
||||||
import android.os.Build;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.provider.MediaStore;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.TextView;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import androidx.activity.EdgeToEdge;
|
import androidx.activity.EdgeToEdge;
|
||||||
import androidx.activity.result.ActivityResultLauncher;
|
|
||||||
import androidx.activity.result.contract.ActivityResultContracts;
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.core.app.ActivityCompat;
|
|
||||||
import androidx.core.content.ContextCompat;
|
|
||||||
import androidx.core.graphics.Insets;
|
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.example.vdcscore.R;
|
import com.example.vdcscore.R;
|
||||||
import com.google.android.material.appbar.MaterialToolbar;
|
|
||||||
import com.google.android.material.textfield.TextInputEditText;
|
|
||||||
import com.google.firebase.auth.FirebaseAuth;
|
|
||||||
import com.google.firebase.auth.FirebaseUser;
|
|
||||||
import com.google.firebase.auth.UserProfileChangeRequest;
|
|
||||||
import com.google.firebase.storage.FirebaseStorage;
|
|
||||||
import com.google.firebase.storage.StorageReference;
|
|
||||||
import com.google.firebase.storage.UploadTask;
|
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.io.InputStream;
|
|
||||||
|
|
||||||
public class ContaActivity extends AppCompatActivity {
|
public class ContaActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private static final int PERMISSION_REQUEST_CODE = 100;
|
|
||||||
|
|
||||||
private ImageView imageProfile;
|
|
||||||
private TextInputEditText editName;
|
|
||||||
private TextView textEmail;
|
|
||||||
private Button btnSaveName;
|
|
||||||
private View btnChangePhoto;
|
|
||||||
private View cardImageContainer;
|
|
||||||
|
|
||||||
private FirebaseAuth mAuth;
|
|
||||||
private FirebaseStorage mStorage;
|
|
||||||
private StorageReference storageRef;
|
|
||||||
private ProgressDialog progressDialog;
|
|
||||||
|
|
||||||
private ActivityResultLauncher<Intent> imagePickerLauncher;
|
|
||||||
private Uri selectedImageUri;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
EdgeToEdge.enable(this);
|
EdgeToEdge.enable(this);
|
||||||
setContentView(R.layout.activity_conta);
|
setContentView(R.layout.activity_conta);
|
||||||
|
|
||||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
|
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
|
||||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
return insets;
|
return insets;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Inicializar componentes
|
|
||||||
initViews();
|
|
||||||
initFirebase();
|
|
||||||
setupImagePicker();
|
|
||||||
loadUserData();
|
|
||||||
setupListeners();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initViews() {
|
|
||||||
MaterialToolbar toolbar = findViewById(R.id.toolbar);
|
|
||||||
setSupportActionBar(toolbar);
|
|
||||||
toolbar.setNavigationOnClickListener(v -> finish());
|
|
||||||
|
|
||||||
imageProfile = findViewById(R.id.imageProfile);
|
|
||||||
editName = findViewById(R.id.editName);
|
|
||||||
textEmail = findViewById(R.id.textEmail);
|
|
||||||
btnSaveName = findViewById(R.id.btnSaveName);
|
|
||||||
btnChangePhoto = findViewById(R.id.btnChangePhoto);
|
|
||||||
cardImageContainer = findViewById(R.id.cardImageContainer);
|
|
||||||
|
|
||||||
progressDialog = new ProgressDialog(this);
|
|
||||||
progressDialog.setMessage("A processar...");
|
|
||||||
progressDialog.setCancelable(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initFirebase() {
|
|
||||||
mAuth = FirebaseAuth.getInstance();
|
|
||||||
mStorage = FirebaseStorage.getInstance();
|
|
||||||
storageRef = mStorage.getReference();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setupImagePicker() {
|
|
||||||
imagePickerLauncher = registerForActivityResult(
|
|
||||||
new ActivityResultContracts.StartActivityForResult(),
|
|
||||||
result -> {
|
|
||||||
if (result.getResultCode() == RESULT_OK && result.getData() != null) {
|
|
||||||
selectedImageUri = result.getData().getData();
|
|
||||||
if (selectedImageUri != null) {
|
|
||||||
try {
|
|
||||||
InputStream inputStream = getContentResolver().openInputStream(selectedImageUri);
|
|
||||||
Bitmap bitmap = BitmapFactory.decodeStream(inputStream);
|
|
||||||
imageProfile.setImageBitmap(bitmap);
|
|
||||||
uploadProfileImage();
|
|
||||||
} catch (Exception e) {
|
|
||||||
Toast.makeText(this, "Erro ao carregar imagem: " + e.getMessage(), Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadUserData() {
|
|
||||||
FirebaseUser user = mAuth.getCurrentUser();
|
|
||||||
if (user != null) {
|
|
||||||
// Carregar email
|
|
||||||
textEmail.setText(user.getEmail());
|
|
||||||
|
|
||||||
// Carregar nome
|
|
||||||
if (user.getDisplayName() != null && !user.getDisplayName().isEmpty()) {
|
|
||||||
editName.setText(user.getDisplayName());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Carregar foto de perfil
|
|
||||||
if (user.getPhotoUrl() != null) {
|
|
||||||
loadProfileImage(user.getPhotoUrl().toString());
|
|
||||||
} else {
|
|
||||||
// Tentar carregar do Storage
|
|
||||||
loadProfileImageFromStorage();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Toast.makeText(this, "Utilizador não autenticado", Toast.LENGTH_SHORT).show();
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadProfileImage(String imageUrl) {
|
|
||||||
// Usar uma biblioteca de imagens seria ideal aqui (Glide/Picasso)
|
|
||||||
// Por agora, vamos usar uma abordagem simples com Thread
|
|
||||||
new Thread(() -> {
|
|
||||||
try {
|
|
||||||
java.net.URL url = new java.net.URL(imageUrl);
|
|
||||||
java.net.HttpURLConnection connection = (java.net.HttpURLConnection) url.openConnection();
|
|
||||||
connection.setDoInput(true);
|
|
||||||
connection.connect();
|
|
||||||
InputStream input = connection.getInputStream();
|
|
||||||
Bitmap bitmap = BitmapFactory.decodeStream(input);
|
|
||||||
runOnUiThread(() -> {
|
|
||||||
if (bitmap != null) {
|
|
||||||
imageProfile.setImageBitmap(bitmap);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} catch (Exception e) {
|
|
||||||
// Se falhar, tentar carregar do Storage
|
|
||||||
runOnUiThread(() -> loadProfileImageFromStorage());
|
|
||||||
}
|
|
||||||
}).start();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadProfileImageFromStorage() {
|
|
||||||
FirebaseUser user = mAuth.getCurrentUser();
|
|
||||||
if (user == null) return;
|
|
||||||
|
|
||||||
StorageReference profileImageRef = storageRef.child("profile_images/" + user.getUid() + ".jpg");
|
|
||||||
profileImageRef.getDownloadUrl().addOnSuccessListener(uri -> {
|
|
||||||
loadProfileImage(uri.toString());
|
|
||||||
}).addOnFailureListener(e -> {
|
|
||||||
// Foto não encontrada, manter imagem padrão
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setupListeners() {
|
|
||||||
btnChangePhoto.setOnClickListener(v -> openImagePicker());
|
|
||||||
cardImageContainer.setOnClickListener(v -> openImagePicker());
|
|
||||||
|
|
||||||
btnSaveName.setOnClickListener(v -> saveUserName());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void openImagePicker() {
|
|
||||||
if (checkPermissions()) {
|
|
||||||
Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
|
|
||||||
imagePickerLauncher.launch(intent);
|
|
||||||
} else {
|
|
||||||
requestPermissions();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean checkPermissions() {
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
|
||||||
return ContextCompat.checkSelfPermission(this, Manifest.permission.READ_MEDIA_IMAGES)
|
|
||||||
== PackageManager.PERMISSION_GRANTED;
|
|
||||||
} else {
|
|
||||||
return ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE)
|
|
||||||
== PackageManager.PERMISSION_GRANTED;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void requestPermissions() {
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
|
||||||
ActivityCompat.requestPermissions(this,
|
|
||||||
new String[]{Manifest.permission.READ_MEDIA_IMAGES},
|
|
||||||
PERMISSION_REQUEST_CODE);
|
|
||||||
} else {
|
|
||||||
ActivityCompat.requestPermissions(this,
|
|
||||||
new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},
|
|
||||||
PERMISSION_REQUEST_CODE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
|
||||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
|
||||||
if (requestCode == PERMISSION_REQUEST_CODE) {
|
|
||||||
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
|
||||||
openImagePicker();
|
|
||||||
} else {
|
|
||||||
Toast.makeText(this, "Permissão necessária para selecionar imagem", Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void uploadProfileImage() {
|
|
||||||
if (selectedImageUri == null) return;
|
|
||||||
|
|
||||||
FirebaseUser user = mAuth.getCurrentUser();
|
|
||||||
if (user == null) return;
|
|
||||||
|
|
||||||
progressDialog.show();
|
|
||||||
|
|
||||||
try {
|
|
||||||
// Comprimir imagem
|
|
||||||
InputStream inputStream = getContentResolver().openInputStream(selectedImageUri);
|
|
||||||
Bitmap bitmap = BitmapFactory.decodeStream(inputStream);
|
|
||||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
|
||||||
bitmap.compress(Bitmap.CompressFormat.JPEG, 80, baos);
|
|
||||||
byte[] imageData = baos.toByteArray();
|
|
||||||
|
|
||||||
// Upload para Firebase Storage
|
|
||||||
StorageReference profileImageRef = storageRef.child("profile_images/" + user.getUid() + ".jpg");
|
|
||||||
UploadTask uploadTask = profileImageRef.putBytes(imageData);
|
|
||||||
|
|
||||||
uploadTask.addOnSuccessListener(taskSnapshot -> {
|
|
||||||
// Obter URL da imagem
|
|
||||||
profileImageRef.getDownloadUrl().addOnSuccessListener(uri -> {
|
|
||||||
// Atualizar perfil do utilizador com a URL da foto
|
|
||||||
UserProfileChangeRequest profileUpdates = new UserProfileChangeRequest.Builder()
|
|
||||||
.setPhotoUri(uri)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
user.updateProfile(profileUpdates).addOnCompleteListener(task -> {
|
|
||||||
progressDialog.dismiss();
|
|
||||||
if (task.isSuccessful()) {
|
|
||||||
Toast.makeText(this, "Foto de perfil atualizada com sucesso!", Toast.LENGTH_SHORT).show();
|
|
||||||
loadProfileImage(uri.toString());
|
|
||||||
} else {
|
|
||||||
Toast.makeText(this, "Erro ao atualizar foto: " +
|
|
||||||
(task.getException() != null ? task.getException().getMessage() : "Erro desconhecido"),
|
|
||||||
Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}).addOnFailureListener(e -> {
|
|
||||||
progressDialog.dismiss();
|
|
||||||
Toast.makeText(this, "Erro ao obter URL da imagem: " + e.getMessage(), Toast.LENGTH_SHORT).show();
|
|
||||||
});
|
|
||||||
}).addOnFailureListener(e -> {
|
|
||||||
progressDialog.dismiss();
|
|
||||||
Toast.makeText(this, "Erro ao fazer upload: " + e.getMessage(), Toast.LENGTH_SHORT).show();
|
|
||||||
});
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
progressDialog.dismiss();
|
|
||||||
Toast.makeText(this, "Erro ao processar imagem: " + e.getMessage(), Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void saveUserName() {
|
|
||||||
String newName = editName.getText().toString().trim();
|
|
||||||
|
|
||||||
if (newName.isEmpty()) {
|
|
||||||
Toast.makeText(this, "Por favor, insira um nome", Toast.LENGTH_SHORT).show();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
FirebaseUser user = mAuth.getCurrentUser();
|
|
||||||
if (user == null) {
|
|
||||||
Toast.makeText(this, "Utilizador não autenticado", Toast.LENGTH_SHORT).show();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
progressDialog.show();
|
|
||||||
|
|
||||||
UserProfileChangeRequest profileUpdates = new UserProfileChangeRequest.Builder()
|
|
||||||
.setDisplayName(newName)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
user.updateProfile(profileUpdates).addOnCompleteListener(task -> {
|
|
||||||
progressDialog.dismiss();
|
|
||||||
if (task.isSuccessful()) {
|
|
||||||
Toast.makeText(this, "Nome atualizado com sucesso!", Toast.LENGTH_SHORT).show();
|
|
||||||
} else {
|
|
||||||
Toast.makeText(this, "Erro ao atualizar nome: " +
|
|
||||||
(task.getException() != null ? task.getException().getMessage() : "Erro desconhecido"),
|
|
||||||
Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="oval">
|
|
||||||
<solid android:color="#FFFFFF" />
|
|
||||||
</shape>
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="oval">
|
|
||||||
<solid android:color="#667eea" />
|
|
||||||
<size
|
|
||||||
android:width="36dp"
|
|
||||||
android:height="36dp" />
|
|
||||||
</shape>
|
|
||||||
|
|
@ -1,243 +1,10 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/main"
|
android:id="@+id/main"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="#F5F5F5"
|
|
||||||
tools:context=".ui.definicoes.ContaActivity">
|
tools:context=".ui.definicoes.ContaActivity">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
android:id="@+id/appBarLayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
|
||||||
app:elevation="0dp">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
|
||||||
android:id="@+id/toolbar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="?attr/actionBarSize"
|
|
||||||
android:background="@drawable/bg_gradient"
|
|
||||||
app:title="Definições de Conta"
|
|
||||||
app:titleTextColor="#FFFFFF"
|
|
||||||
app:navigationIcon="@drawable/ic_arrow_back"
|
|
||||||
app:navigationIconTint="#FFFFFF" />
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
|
||||||
android:fillViewport="true">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="24dp">
|
|
||||||
|
|
||||||
<!-- Profile Photo Section -->
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
|
||||||
android:id="@+id/cardProfilePhoto"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="24dp"
|
|
||||||
app:cardCornerRadius="20dp"
|
|
||||||
app:cardElevation="4dp"
|
|
||||||
app:cardBackgroundColor="#FFFFFF"
|
|
||||||
app:strokeWidth="0dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="24dp"
|
|
||||||
android:gravity="center">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Foto de Perfil"
|
|
||||||
android:textSize="18sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="#1A1A1A"
|
|
||||||
android:layout_marginBottom="20dp" />
|
|
||||||
|
|
||||||
<!-- Profile Image -->
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
|
||||||
android:id="@+id/cardImageContainer"
|
|
||||||
android:layout_width="120dp"
|
|
||||||
android:layout_height="120dp"
|
|
||||||
app:cardCornerRadius="60dp"
|
|
||||||
app:cardElevation="6dp"
|
|
||||||
app:cardBackgroundColor="#FFFFFF"
|
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"
|
|
||||||
android:foreground="?attr/selectableItemBackgroundBorderless">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/imageProfile"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:contentDescription="Foto de perfil"
|
|
||||||
android:src="@android:drawable/ic_menu_camera"
|
|
||||||
android:background="#E0E0E0" />
|
|
||||||
|
|
||||||
<!-- Edit Icon Overlay -->
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iconEditPhoto"
|
|
||||||
android:layout_width="36dp"
|
|
||||||
android:layout_height="36dp"
|
|
||||||
android:layout_gravity="bottom|end"
|
|
||||||
android:layout_margin="8dp"
|
|
||||||
android:src="@android:drawable/ic_menu_edit"
|
|
||||||
android:background="@drawable/circle_edit_background"
|
|
||||||
android:padding="8dp"
|
|
||||||
android:contentDescription="Editar foto" />
|
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/btnChangePhoto"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:text="Alterar Foto"
|
|
||||||
android:textColor="#667eea"
|
|
||||||
android:textSize="15sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"
|
|
||||||
android:padding="12dp"
|
|
||||||
android:background="?attr/selectableItemBackgroundBorderless" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
|
|
||||||
<!-- Name Section -->
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
|
||||||
android:id="@+id/cardName"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="24dp"
|
|
||||||
app:cardCornerRadius="20dp"
|
|
||||||
app:cardElevation="4dp"
|
|
||||||
app:cardBackgroundColor="#FFFFFF"
|
|
||||||
app:strokeWidth="0dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="24dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Nome"
|
|
||||||
android:textSize="18sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="#1A1A1A"
|
|
||||||
android:layout_marginBottom="16dp" />
|
|
||||||
|
|
||||||
<!-- Name Input -->
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="Nome completo"
|
|
||||||
app:boxCornerRadiusTopStart="16dp"
|
|
||||||
app:boxCornerRadiusTopEnd="16dp"
|
|
||||||
app:boxCornerRadiusBottomStart="16dp"
|
|
||||||
app:boxCornerRadiusBottomEnd="16dp"
|
|
||||||
app:boxStrokeWidth="2dp"
|
|
||||||
app:boxStrokeWidthFocused="2dp"
|
|
||||||
app:boxStrokeColor="#E0E0E0"
|
|
||||||
app:boxStrokeColorFocused="#667eea"
|
|
||||||
app:startIconDrawable="@android:drawable/ic_menu_myplaces"
|
|
||||||
app:startIconTint="#667eea"
|
|
||||||
app:hintTextColor="#667eea"
|
|
||||||
app:boxBackgroundMode="outline"
|
|
||||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/editName"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:inputType="textPersonName"
|
|
||||||
android:textColor="#1A1A1A"
|
|
||||||
android:textColorHint="#9E9E9E"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:padding="18dp"
|
|
||||||
android:background="@android:color/transparent" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<!-- Save Name Button -->
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btnSaveName"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="56dp"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:background="@drawable/button_modern"
|
|
||||||
android:text="Guardar Nome"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:elevation="4dp"
|
|
||||||
android:stateListAnimator="@null" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
|
|
||||||
<!-- Email Display (Read-only) -->
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
|
||||||
android:id="@+id/cardEmail"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:cardCornerRadius="20dp"
|
|
||||||
app:cardElevation="4dp"
|
|
||||||
app:cardBackgroundColor="#FFFFFF"
|
|
||||||
app:strokeWidth="0dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="24dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Email"
|
|
||||||
android:textSize="18sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="#1A1A1A"
|
|
||||||
android:layout_marginBottom="12dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textEmail"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="email@exemplo.com"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textColor="#757575"
|
|
||||||
android:padding="12dp"
|
|
||||||
android:background="#F5F5F5"
|
|
||||||
android:layout_marginTop="4dp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
||||||
|
|
@ -6,257 +6,195 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/bg_gradient"
|
android:background="@drawable/bg_gradient"
|
||||||
android:id="@+id/main"
|
android:id="@+id/main">
|
||||||
android:padding="0dp">
|
|
||||||
|
|
||||||
<!-- Decorative circles for modern look -->
|
<!-- Logo/Title -->
|
||||||
<View
|
<TextView
|
||||||
android:id="@+id/circle1"
|
android:id="@+id/textView4"
|
||||||
android:layout_width="200dp"
|
|
||||||
android:layout_height="200dp"
|
|
||||||
android:background="@drawable/circle_decoration"
|
|
||||||
android:alpha="0.1"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintEnd_margin="-80dp"
|
|
||||||
app:layout_constraintTop_margin="-80dp" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/circle2"
|
|
||||||
android:layout_width="150dp"
|
|
||||||
android:layout_height="150dp"
|
|
||||||
android:background="@drawable/circle_decoration"
|
|
||||||
android:alpha="0.15"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_margin="-60dp"
|
|
||||||
app:layout_constraintBottom_margin="100dp" />
|
|
||||||
|
|
||||||
<!-- Logo/Title Section -->
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/headerSection"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:layout_marginTop="60dp"
|
||||||
android:gravity="center"
|
android:text="VdcScore"
|
||||||
|
android:textSize="42sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:letterSpacing="0.1"
|
||||||
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_toTopOf="parent" />
|
||||||
app:layout_constraintTop_margin="60dp">
|
|
||||||
|
|
||||||
<TextView
|
<!-- Subtitle -->
|
||||||
android:id="@+id/textView4"
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/textView"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:text="VdcScore"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="48sp"
|
android:layout_marginTop="8dp"
|
||||||
android:textStyle="bold"
|
android:text="Criar Conta"
|
||||||
android:textColor="#FFFFFF"
|
android:textSize="16sp"
|
||||||
android:letterSpacing="0.05"
|
android:textColor="#FFFFFF"
|
||||||
android:elevation="4dp" />
|
android:alpha="0.9"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView4" />
|
||||||
|
|
||||||
<TextView
|
<!-- Card -->
|
||||||
android:id="@+id/textView"
|
<androidx.cardview.widget.CardView
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:text="Criar Conta"
|
|
||||||
android:textSize="18sp"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:alpha="0.95"
|
|
||||||
android:fontFamily="sans-serif-light" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Main Card -->
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
|
||||||
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_marginStart="24dp"
|
android:layout_marginStart="24dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:layout_marginTop="40dp"
|
android:layout_marginTop="40dp"
|
||||||
android:elevation="12dp"
|
android:elevation="8dp"
|
||||||
app:cardCornerRadius="28dp"
|
android:padding="28dp"
|
||||||
|
app:cardCornerRadius="24dp"
|
||||||
app:cardBackgroundColor="#FFFFFF"
|
app:cardBackgroundColor="#FFFFFF"
|
||||||
app:cardUseCompatPadding="true"
|
app:cardUseCompatPadding="true"
|
||||||
app:strokeWidth="0dp"
|
|
||||||
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/headerSection">
|
app:layout_constraintTop_toBottomOf="@+id/textView">
|
||||||
|
|
||||||
<ScrollView
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fillViewport="true">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<!-- Title inside card -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Registo"
|
||||||
|
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"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textColor="#90A4AE"
|
||||||
|
android:layout_marginBottom="24dp" />
|
||||||
|
|
||||||
|
<!-- Email -->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:layout_marginBottom="16dp"
|
||||||
android:padding="32dp">
|
android:hint="Email"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp"
|
||||||
|
app:boxStrokeWidth="0dp"
|
||||||
|
app:boxStrokeWidthFocused="0dp"
|
||||||
|
app:startIconDrawable="@android:drawable/ic_dialog_email"
|
||||||
|
app:startIconTint="#667eea"
|
||||||
|
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
||||||
|
|
||||||
<!-- Title inside card -->
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
<TextView
|
android:id="@+id/editEmail"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Registo"
|
|
||||||
android:textSize="32sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="#1A1A1A"
|
|
||||||
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="15sp"
|
|
||||||
android:textColor="#757575"
|
|
||||||
android:layout_marginBottom="32dp" />
|
|
||||||
|
|
||||||
<!-- Email Input -->
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="20dp"
|
android:inputType="textEmailAddress"
|
||||||
android:hint="Email"
|
android:textColor="#263238"
|
||||||
app:boxCornerRadiusTopStart="16dp"
|
android:textColorHint="#90A4AE"
|
||||||
app:boxCornerRadiusTopEnd="16dp"
|
android:padding="16dp" />
|
||||||
app:boxCornerRadiusBottomStart="16dp"
|
|
||||||
app:boxCornerRadiusBottomEnd="16dp"
|
|
||||||
app:boxStrokeWidth="2dp"
|
|
||||||
app:boxStrokeWidthFocused="2dp"
|
|
||||||
app:boxStrokeColor="#E0E0E0"
|
|
||||||
app:boxStrokeColorFocused="#667eea"
|
|
||||||
app:startIconDrawable="@android:drawable/ic_dialog_email"
|
|
||||||
app:startIconTint="#667eea"
|
|
||||||
app:hintTextColor="#667eea"
|
|
||||||
app:boxBackgroundMode="outline"
|
|
||||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
android:id="@+id/editEmail"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:inputType="textEmailAddress"
|
|
||||||
android:textColor="#1A1A1A"
|
|
||||||
android:textColorHint="#9E9E9E"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:padding="18dp"
|
|
||||||
android:background="@android:color/transparent" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
<!-- Password -->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:hint="Password"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp"
|
||||||
|
app:boxStrokeWidth="0dp"
|
||||||
|
app:boxStrokeWidthFocused="0dp"
|
||||||
|
app:startIconDrawable="@android:drawable/ic_lock_lock"
|
||||||
|
app:startIconTint="#667eea"
|
||||||
|
app:endIconMode="password_toggle"
|
||||||
|
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
||||||
|
|
||||||
<!-- Password Input -->
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
<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="20dp"
|
android:inputType="textPassword"
|
||||||
android:hint="Password"
|
android:textColor="#263238"
|
||||||
app:boxCornerRadiusTopStart="16dp"
|
android:textColorHint="#90A4AE"
|
||||||
app:boxCornerRadiusTopEnd="16dp"
|
android:padding="16dp" />
|
||||||
app:boxCornerRadiusBottomStart="16dp"
|
|
||||||
app:boxCornerRadiusBottomEnd="16dp"
|
|
||||||
app:boxStrokeWidth="2dp"
|
|
||||||
app:boxStrokeWidthFocused="2dp"
|
|
||||||
app:boxStrokeColor="#E0E0E0"
|
|
||||||
app:boxStrokeColorFocused="#667eea"
|
|
||||||
app:startIconDrawable="@android:drawable/ic_lock_lock"
|
|
||||||
app:startIconTint="#667eea"
|
|
||||||
app:hintTextColor="#667eea"
|
|
||||||
app:endIconMode="password_toggle"
|
|
||||||
app:endIconTint="#667eea"
|
|
||||||
app:boxBackgroundMode="outline"
|
|
||||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
android:id="@+id/editPassword2"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:inputType="textPassword"
|
|
||||||
android:textColor="#1A1A1A"
|
|
||||||
android:textColorHint="#9E9E9E"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:padding="18dp"
|
|
||||||
android:background="@android:color/transparent" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
<!-- Confirmar Password -->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="24dp"
|
||||||
|
android:hint="Confirmar Password"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp"
|
||||||
|
app:boxStrokeWidth="0dp"
|
||||||
|
app:boxStrokeWidthFocused="0dp"
|
||||||
|
app:startIconDrawable="@android:drawable/ic_lock_lock"
|
||||||
|
app:startIconTint="#667eea"
|
||||||
|
app:endIconMode="password_toggle"
|
||||||
|
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
||||||
|
|
||||||
<!-- Confirm Password Input -->
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
<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="12dp"
|
android:inputType="textPassword"
|
||||||
android:hint="Confirmar Password"
|
android:textColor="#263238"
|
||||||
app:boxCornerRadiusTopStart="16dp"
|
android:textColorHint="#90A4AE"
|
||||||
app:boxCornerRadiusTopEnd="16dp"
|
android:padding="16dp" />
|
||||||
app:boxCornerRadiusBottomStart="16dp"
|
|
||||||
app:boxCornerRadiusBottomEnd="16dp"
|
|
||||||
app:boxStrokeWidth="2dp"
|
|
||||||
app:boxStrokeWidthFocused="2dp"
|
|
||||||
app:boxStrokeColor="#E0E0E0"
|
|
||||||
app:boxStrokeColorFocused="#667eea"
|
|
||||||
app:startIconDrawable="@android:drawable/ic_lock_lock"
|
|
||||||
app:startIconTint="#667eea"
|
|
||||||
app:hintTextColor="#667eea"
|
|
||||||
app:endIconMode="password_toggle"
|
|
||||||
app:endIconTint="#667eea"
|
|
||||||
app:boxBackgroundMode="outline"
|
|
||||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
android:id="@+id/editConfirmPassword"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:inputType="textPassword"
|
|
||||||
android:textColor="#1A1A1A"
|
|
||||||
android:textColorHint="#9E9E9E"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:padding="18dp"
|
|
||||||
android:background="@android:color/transparent" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
<!-- Botão -->
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnCreateAccount"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:background="@drawable/button_modern"
|
||||||
|
android:text="Criar Conta"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:elevation="4dp"
|
||||||
|
android:stateListAnimator="@null" />
|
||||||
|
|
||||||
<!-- Create Account Button -->
|
</LinearLayout>
|
||||||
<Button
|
|
||||||
android:id="@+id/btnCreateAccount"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:background="@drawable/button_modern"
|
|
||||||
android:text="Criar Conta"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:textSize="17sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:letterSpacing="0.05"
|
|
||||||
android:elevation="6dp"
|
|
||||||
android:stateListAnimator="@null"
|
|
||||||
android:layout_marginTop="12dp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
</ScrollView>
|
<!-- Voltar ao Login -->
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
|
|
||||||
<!-- Login Link -->
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/loginSection"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:padding="16dp"
|
|
||||||
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">
|
||||||
app:layout_constraintTop_margin="24dp">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Já tens conta? "
|
android:text="Já tens conta? "
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textSize="15sp"
|
android:textSize="14sp"
|
||||||
android:alpha="0.9" />
|
android:alpha="0.9" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
@ -266,11 +204,11 @@
|
||||||
android:text="Entrar"
|
android:text="Entrar"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textSize="15sp"
|
android:textSize="14sp"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:padding="8dp"
|
android:padding="4dp"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless" />
|
android:background="?attr/selectableItemBackground" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,127 +5,91 @@
|
||||||
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="@drawable/bg_gradient"
|
android:background="@drawable/bg_gradient">
|
||||||
android:padding="0dp">
|
|
||||||
|
|
||||||
<!-- Decorative circles for modern look -->
|
<!-- Logo/Title -->
|
||||||
<View
|
<TextView
|
||||||
android:id="@+id/circle1"
|
android:id="@+id/textView3"
|
||||||
android:layout_width="200dp"
|
|
||||||
android:layout_height="200dp"
|
|
||||||
android:background="@drawable/circle_decoration"
|
|
||||||
android:alpha="0.1"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintEnd_margin="-80dp"
|
|
||||||
app:layout_constraintTop_margin="-80dp" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/circle2"
|
|
||||||
android:layout_width="150dp"
|
|
||||||
android:layout_height="150dp"
|
|
||||||
android:background="@drawable/circle_decoration"
|
|
||||||
android:alpha="0.15"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_margin="-60dp"
|
|
||||||
app:layout_constraintBottom_margin="100dp" />
|
|
||||||
|
|
||||||
<!-- Logo/Title Section -->
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/headerSection"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:layout_marginTop="80dp"
|
||||||
android:gravity="center"
|
android:text="VdcScore"
|
||||||
|
android:textSize="42sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:letterSpacing="0.1"
|
||||||
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_toTopOf="parent" />
|
||||||
app:layout_constraintTop_margin="80dp">
|
|
||||||
|
|
||||||
<TextView
|
<!-- Subtitle -->
|
||||||
android:id="@+id/textView3"
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/textSubtitle"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:text="VdcScore"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="48sp"
|
android:layout_marginTop="8dp"
|
||||||
android:textStyle="bold"
|
android:text="Bem-vindo de volta"
|
||||||
android:textColor="#FFFFFF"
|
android:textSize="16sp"
|
||||||
android:letterSpacing="0.05"
|
android:textColor="#FFFFFF"
|
||||||
android:elevation="4dp" />
|
android:alpha="0.9"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView3" />
|
||||||
|
|
||||||
<TextView
|
<!-- Card -->
|
||||||
android:id="@+id/textSubtitle"
|
<androidx.cardview.widget.CardView
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:text="Bem-vindo de volta"
|
|
||||||
android:textSize="18sp"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:alpha="0.95"
|
|
||||||
android:fontFamily="sans-serif-light" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Main Card -->
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
|
||||||
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_marginStart="24dp"
|
android:layout_marginStart="24dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:layout_marginTop="40dp"
|
android:layout_marginTop="48dp"
|
||||||
android:elevation="12dp"
|
android:elevation="8dp"
|
||||||
app:cardCornerRadius="28dp"
|
android:padding="28dp"
|
||||||
|
app:cardCornerRadius="24dp"
|
||||||
app:cardBackgroundColor="#FFFFFF"
|
app:cardBackgroundColor="#FFFFFF"
|
||||||
app:cardUseCompatPadding="true"
|
app:cardUseCompatPadding="true"
|
||||||
app:strokeWidth="0dp"
|
|
||||||
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/headerSection">
|
app:layout_constraintTop_toBottomOf="@+id/textSubtitle">
|
||||||
|
|
||||||
<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">
|
|
||||||
|
|
||||||
<!-- Title inside card -->
|
<!-- Title inside card -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Login"
|
android:text="Login"
|
||||||
android:textSize="32sp"
|
android:textSize="28sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textColor="#1A1A1A"
|
android:textColor="#263238"
|
||||||
android:layout_marginBottom="8dp" />
|
android:layout_marginBottom="8dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Entre na sua conta para continuar"
|
android:text="Entre na sua conta"
|
||||||
android:textSize="15sp"
|
android:textSize="14sp"
|
||||||
android:textColor="#757575"
|
android:textColor="#90A4AE"
|
||||||
android:layout_marginBottom="32dp" />
|
android:layout_marginBottom="24dp" />
|
||||||
|
|
||||||
<!-- Email Input -->
|
<!-- Email -->
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="20dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:hint="Email"
|
android:hint="Email"
|
||||||
app:boxCornerRadiusTopStart="16dp"
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
app:boxCornerRadiusTopEnd="16dp"
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
app:boxCornerRadiusBottomStart="16dp"
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
app:boxCornerRadiusBottomEnd="16dp"
|
app:boxCornerRadiusBottomEnd="12dp"
|
||||||
app:boxStrokeWidth="2dp"
|
app:boxStrokeWidth="0dp"
|
||||||
app:boxStrokeWidthFocused="2dp"
|
app:boxStrokeWidthFocused="0dp"
|
||||||
app:boxStrokeColor="#E0E0E0"
|
|
||||||
app:boxStrokeColorFocused="#667eea"
|
|
||||||
app:startIconDrawable="@android:drawable/ic_dialog_email"
|
app:startIconDrawable="@android:drawable/ic_dialog_email"
|
||||||
app:startIconTint="#667eea"
|
app:startIconTint="#667eea"
|
||||||
app:hintTextColor="#667eea"
|
|
||||||
app:boxBackgroundMode="outline"
|
|
||||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
|
@ -133,34 +97,27 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="textEmailAddress"
|
android:inputType="textEmailAddress"
|
||||||
android:textColor="#1A1A1A"
|
android:textColor="#263238"
|
||||||
android:textColorHint="#9E9E9E"
|
android:textColorHint="#90A4AE"
|
||||||
android:textSize="16sp"
|
android:padding="16dp" />
|
||||||
android:padding="18dp"
|
|
||||||
android:background="@android:color/transparent" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<!-- Password Input -->
|
<!-- Password -->
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
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="8dp"
|
||||||
android:hint="Password"
|
android:hint="Password"
|
||||||
app:boxCornerRadiusTopStart="16dp"
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
app:boxCornerRadiusTopEnd="16dp"
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
app:boxCornerRadiusBottomStart="16dp"
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
app:boxCornerRadiusBottomEnd="16dp"
|
app:boxCornerRadiusBottomEnd="12dp"
|
||||||
app:boxStrokeWidth="2dp"
|
app:boxStrokeWidth="0dp"
|
||||||
app:boxStrokeWidthFocused="2dp"
|
app:boxStrokeWidthFocused="0dp"
|
||||||
app:boxStrokeColor="#E0E0E0"
|
|
||||||
app:boxStrokeColorFocused="#667eea"
|
|
||||||
app:startIconDrawable="@android:drawable/ic_lock_lock"
|
app:startIconDrawable="@android:drawable/ic_lock_lock"
|
||||||
app:startIconTint="#667eea"
|
app:startIconTint="#667eea"
|
||||||
app:hintTextColor="#667eea"
|
|
||||||
app:endIconMode="password_toggle"
|
app:endIconMode="password_toggle"
|
||||||
app:endIconTint="#667eea"
|
|
||||||
app:boxBackgroundMode="outline"
|
|
||||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
|
@ -168,11 +125,9 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="textPassword"
|
android:inputType="textPassword"
|
||||||
android:textColor="#1A1A1A"
|
android:textColor="#263238"
|
||||||
android:textColorHint="#9E9E9E"
|
android:textColorHint="#90A4AE"
|
||||||
android:textSize="16sp"
|
android:padding="16dp" />
|
||||||
android:padding="18dp"
|
|
||||||
android:background="@android:color/transparent" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
@ -182,54 +137,50 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:layout_marginBottom="28dp"
|
android:layout_marginBottom="24dp"
|
||||||
android:text="Esqueceu a palavra-passe?"
|
android:text="Esqueceu a palavra-passe?"
|
||||||
android:textColor="#667eea"
|
android:textColor="#667eea"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:padding="8dp"
|
android:padding="4dp" />
|
||||||
android:background="?attr/selectableItemBackgroundBorderless" />
|
|
||||||
|
|
||||||
<!-- Login Button -->
|
<!-- 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="60dp"
|
android:layout_height="56dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
android:background="@drawable/button_modern"
|
android:background="@drawable/button_modern"
|
||||||
android:text="Entrar"
|
android:text="Entrar"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textSize="17sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:letterSpacing="0.05"
|
android:elevation="4dp"
|
||||||
android:elevation="6dp"
|
android:stateListAnimator="@null" />
|
||||||
android:stateListAnimator="@null"
|
|
||||||
android:layout_marginTop="4dp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<!-- Register Link -->
|
<!-- Criar conta -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/registerSection"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:padding="16dp"
|
|
||||||
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">
|
||||||
app:layout_constraintTop_margin="24dp">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
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:text="Não tens conta? "
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textSize="15sp"
|
android:textSize="14sp"
|
||||||
android:alpha="0.9" />
|
android:alpha="0.9" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
@ -239,12 +190,11 @@
|
||||||
android:text="Criar conta"
|
android:text="Criar conta"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textSize="15sp"
|
android:textSize="14sp"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:padding="8dp"
|
android:padding="4dp"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
android:background="?attr/selectableItemBackground" />
|
||||||
android:drawablePadding="4dp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ credentials = "1.5.0"
|
||||||
credentialsPlayServicesAuth = "1.5.0"
|
credentialsPlayServicesAuth = "1.5.0"
|
||||||
googleid = "1.1.1"
|
googleid = "1.1.1"
|
||||||
firebaseDatabase = "22.0.1"
|
firebaseDatabase = "22.0.1"
|
||||||
firebaseStorage = "21.0.1"
|
|
||||||
lifecycleLivedataKtx = "2.9.4"
|
lifecycleLivedataKtx = "2.9.4"
|
||||||
lifecycleViewmodelKtx = "2.9.4"
|
lifecycleViewmodelKtx = "2.9.4"
|
||||||
navigationFragment = "2.9.6"
|
navigationFragment = "2.9.6"
|
||||||
|
|
@ -32,7 +31,6 @@ credentials = { group = "androidx.credentials", name = "credentials", version.re
|
||||||
credentials-play-services-auth = { group = "androidx.credentials", name = "credentials-play-services-auth", version.ref = "credentialsPlayServicesAuth" }
|
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" }
|
googleid = { group = "com.google.android.libraries.identity.googleid", name = "googleid", version.ref = "googleid" }
|
||||||
firebase-database = { group = "com.google.firebase", name = "firebase-database", version.ref = "firebaseDatabase" }
|
firebase-database = { group = "com.google.firebase", name = "firebase-database", version.ref = "firebaseDatabase" }
|
||||||
firebase-storage = { group = "com.google.firebase", name = "firebase-storage", version.ref = "firebaseStorage" }
|
|
||||||
lifecycle-livedata-ktx = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtx" }
|
lifecycle-livedata-ktx = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtx" }
|
||||||
lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" }
|
lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" }
|
||||||
navigation-fragment = { group = "androidx.navigation", name = "navigation-fragment", version.ref = "navigationFragment" }
|
navigation-fragment = { group = "androidx.navigation", name = "navigation-fragment", version.ref = "navigationFragment" }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue