refactor: Update settings UI to use color resources and refine MaterialCardView styling.
This commit is contained in:
@@ -99,18 +99,31 @@ public class ContaActivity extends AppCompatActivity {
|
||||
imageProfile = findViewById(R.id.imageProfile);
|
||||
editName = findViewById(R.id.editName);
|
||||
editImageUrl = findViewById(R.id.editImageUrl);
|
||||
// textEmail removed from class fields if not used, or kept if used.
|
||||
// In XML it is present as @+id/textEmail inside cardSecurity.
|
||||
textEmail = findViewById(R.id.textEmail);
|
||||
|
||||
btnSaveAll = findViewById(R.id.btnSaveAll);
|
||||
btnLoadImageUrl = findViewById(R.id.btnLoadImageUrl);
|
||||
btnChangeEmail = findViewById(R.id.btnChangeEmail);
|
||||
btnChangePassword = findViewById(R.id.btnChangePassword);
|
||||
btnLogout = findViewById(R.id.btnLogout);
|
||||
btnChangePhoto = findViewById(R.id.btnChangePhoto);
|
||||
|
||||
// New FAB for editing photo
|
||||
btnChangePhoto = findViewById(R.id.fabEditPhoto);
|
||||
// Also allow clicking the text
|
||||
View btnChangePhotoText = findViewById(R.id.btnChangePhoto);
|
||||
|
||||
cardImageContainer = findViewById(R.id.cardImageContainer);
|
||||
|
||||
progressDialog = new ProgressDialog(this);
|
||||
progressDialog.setMessage("A processar...");
|
||||
progressDialog.setCancelable(false);
|
||||
|
||||
// Setup listeners here or in setupListeners()
|
||||
if (btnChangePhotoText != null) {
|
||||
btnChangePhotoText.setOnClickListener(v -> openImagePicker());
|
||||
}
|
||||
}
|
||||
|
||||
private void initFirebase() {
|
||||
@@ -139,12 +152,12 @@ public class ContaActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Toast.makeText(this, "Erro ao carregar imagem: " + e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(this, "Erro ao carregar imagem: " + e.getMessage(), Toast.LENGTH_SHORT)
|
||||
.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
private void setupPermissionLauncher() {
|
||||
@@ -156,8 +169,7 @@ public class ContaActivity extends AppCompatActivity {
|
||||
} else {
|
||||
Toast.makeText(this, "Permissão necessária para selecionar imagem", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
private void loadUserData() {
|
||||
@@ -217,7 +229,8 @@ public class ContaActivity extends AppCompatActivity {
|
||||
|
||||
private void loadProfileImageFromStorage() {
|
||||
FirebaseUser user = mAuth.getCurrentUser();
|
||||
if (user == null) return;
|
||||
if (user == null)
|
||||
return;
|
||||
|
||||
StorageReference profileImageRef = storageRef.child("profile_images/" + user.getUid() + ".jpg");
|
||||
profileImageRef.getDownloadUrl().addOnSuccessListener(uri -> {
|
||||
@@ -267,7 +280,8 @@ public class ContaActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
private void loadImageFromUrl() {
|
||||
if (editImageUrl == null) return;
|
||||
if (editImageUrl == null)
|
||||
return;
|
||||
|
||||
String imageUrl = editImageUrl.getText().toString().trim();
|
||||
|
||||
@@ -320,7 +334,8 @@ public class ContaActivity extends AppCompatActivity {
|
||||
|
||||
private void updateProfileWithImageUrl(String imageUrl) {
|
||||
FirebaseUser user = mAuth.getCurrentUser();
|
||||
if (user == null) return;
|
||||
if (user == null)
|
||||
return;
|
||||
|
||||
progressDialog.show();
|
||||
|
||||
@@ -349,10 +364,12 @@ public class ContaActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
private void uploadProfileImage() {
|
||||
if (selectedImageUri == null) return;
|
||||
if (selectedImageUri == null)
|
||||
return;
|
||||
|
||||
FirebaseUser user = mAuth.getCurrentUser();
|
||||
if (user == null) return;
|
||||
if (user == null)
|
||||
return;
|
||||
|
||||
progressDialog.show();
|
||||
|
||||
@@ -402,7 +419,8 @@ public class ContaActivity extends AppCompatActivity {
|
||||
loadProfileImage(uri.toString());
|
||||
} else {
|
||||
Toast.makeText(this, "Erro ao atualizar foto: " +
|
||||
(task.getException() != null ? task.getException().getMessage() : "Erro desconhecido"),
|
||||
(task.getException() != null ? task.getException().getMessage()
|
||||
: "Erro desconhecido"),
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
@@ -430,7 +448,8 @@ public class ContaActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
private void saveAllChanges() {
|
||||
if (editName == null) return;
|
||||
if (editName == null)
|
||||
return;
|
||||
|
||||
String newName = editName.getText().toString().trim();
|
||||
|
||||
@@ -507,7 +526,8 @@ public class ContaActivity extends AppCompatActivity {
|
||||
"Email de verificação enviado! Verifique a sua caixa de entrada para alterar o email.",
|
||||
Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
// Se não conseguir enviar email de verificação, enviar email de reset de password
|
||||
// Se não conseguir enviar email de verificação, enviar email de reset de
|
||||
// password
|
||||
// que pode ser usado para alterar o email através do Firebase Console
|
||||
mAuth.sendPasswordResetEmail(user.getEmail())
|
||||
.addOnCompleteListener(resetTask -> {
|
||||
@@ -517,7 +537,8 @@ public class ContaActivity extends AppCompatActivity {
|
||||
Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
String errorMessage = "Erro ao enviar email!";
|
||||
if (resetTask.getException() != null && resetTask.getException().getMessage() != null) {
|
||||
if (resetTask.getException() != null
|
||||
&& resetTask.getException().getMessage() != null) {
|
||||
errorMessage = "Erro: " + resetTask.getException().getMessage();
|
||||
}
|
||||
Toast.makeText(this, errorMessage, Toast.LENGTH_LONG).show();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#F5F5F5"
|
||||
android:background="@color/background_light"
|
||||
tools:context=".ui.definicoes.ContaActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
@@ -20,11 +20,11 @@
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="#FFFFFF"
|
||||
android:background="@color/primary_color"
|
||||
app:title="Definições de Conta"
|
||||
app:titleTextColor="#212121"
|
||||
app:titleTextColor="@color/white"
|
||||
app:navigationIcon="@drawable/ic_arrow_back"
|
||||
app:navigationIconTint="#212121" />
|
||||
app:navigationIconTint="@color/white" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
@@ -45,10 +45,10 @@
|
||||
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"
|
||||
android:layout_marginBottom="20dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardBackgroundColor="@color/surface_card"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<LinearLayout
|
||||
@@ -64,10 +64,14 @@
|
||||
android:text="Foto de Perfil"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#1A1A1A"
|
||||
android:layout_marginBottom="20dp" />
|
||||
android:textColor="@color/primary_color"
|
||||
android:layout_marginBottom="24dp" />
|
||||
|
||||
<!-- Profile Image -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cardImageContainer"
|
||||
android:layout_width="120dp"
|
||||
@@ -88,32 +92,33 @@
|
||||
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>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fabEditPhoto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:fabSize="mini"
|
||||
app:backgroundTint="@color/secondary_color"
|
||||
app:tint="@color/white"
|
||||
android:src="@android:drawable/ic_menu_edit"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/cardImageContainer"
|
||||
app:layout_constraintEnd_toEndOf="@+id/cardImageContainer"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnChangePhoto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="Alterar Foto (Galeria)"
|
||||
android:textColor="#616161"
|
||||
android:textSize="15sp"
|
||||
android:text="Toque para alterar"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="12dp"
|
||||
android:padding="8dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless" />
|
||||
|
||||
<!-- URL Input Section -->
|
||||
@@ -127,9 +132,9 @@
|
||||
app:boxCornerRadiusBottomStart="12dp"
|
||||
app:boxCornerRadiusBottomEnd="12dp"
|
||||
app:boxStrokeWidth="1dp"
|
||||
app:boxStrokeColor="#BDBDBD"
|
||||
app:boxStrokeColor="@color/divider"
|
||||
app:startIconDrawable="@android:drawable/ic_menu_view"
|
||||
app:startIconTint="#616161"
|
||||
app:startIconTint="@color/text_secondary"
|
||||
app:boxBackgroundMode="outline"
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
||||
|
||||
@@ -138,8 +143,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textUri"
|
||||
android:textColor="#212121"
|
||||
android:textColorHint="#9E9E9E"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textColorHint="@color/text_secondary"
|
||||
android:textSize="14sp"
|
||||
android:padding="14dp"
|
||||
android:background="@android:color/transparent"
|
||||
@@ -150,15 +155,13 @@
|
||||
<Button
|
||||
android:id="@+id/btnLoadImageUrl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:backgroundTint="#616161"
|
||||
android:backgroundTint="@color/primary_light"
|
||||
android:text="Carregar Imagem da URL"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:elevation="2dp"
|
||||
android:stateListAnimator="@null" />
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -169,10 +172,10 @@
|
||||
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"
|
||||
android:layout_marginBottom="20dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardBackgroundColor="@color/surface_card"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<LinearLayout
|
||||
@@ -187,7 +190,7 @@
|
||||
android:text="Nome de Utilizador"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#1A1A1A"
|
||||
android:textColor="@color/primary_color"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Name Input -->
|
||||
@@ -195,14 +198,14 @@
|
||||
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:boxStrokeColor="#BDBDBD"
|
||||
app:boxCornerRadiusTopStart="12dp"
|
||||
app:boxCornerRadiusTopEnd="12dp"
|
||||
app:boxCornerRadiusBottomStart="12dp"
|
||||
app:boxCornerRadiusBottomEnd="12dp"
|
||||
app:boxStrokeWidth="1dp"
|
||||
app:boxStrokeColor="@color/divider"
|
||||
app:startIconDrawable="@android:drawable/ic_menu_myplaces"
|
||||
app:startIconTint="#616161"
|
||||
app:startIconTint="@color/text_secondary"
|
||||
app:boxBackgroundMode="outline"
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
||||
|
||||
@@ -211,27 +214,38 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPersonName"
|
||||
android:textColor="#1A1A1A"
|
||||
android:textColorHint="#9E9E9E"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textColorHint="@color/text_secondary"
|
||||
android:textSize="16sp"
|
||||
android:padding="18dp"
|
||||
android:padding="16dp"
|
||||
android:background="@android:color/transparent" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSaveAll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:backgroundTint="@color/primary_color"
|
||||
android:text="Guardar Alterações"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Email Section -->
|
||||
<!-- Security Section -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cardEmail"
|
||||
android:id="@+id/cardSecurity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="24dp"
|
||||
app:cardCornerRadius="20dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardBackgroundColor="#FFFFFF"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardBackgroundColor="@color/surface_card"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<LinearLayout
|
||||
@@ -240,112 +254,52 @@
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Segurança"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/primary_color"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Email"
|
||||
android:textSize="18sp"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#1A1A1A"
|
||||
android:layout_marginBottom="12dp" />
|
||||
android:textColor="@color/text_secondary"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textEmail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="email@exemplo.com"
|
||||
android:textSize="16sp"
|
||||
android:textColor="#757575"
|
||||
android:textColor="@color/text_primary"
|
||||
android:padding="12dp"
|
||||
android:background="#F5F5F5"
|
||||
android:layout_marginBottom="16dp" />
|
||||
android:background="@drawable/shape_score_bg"
|
||||
android:backgroundTint="@color/background_light"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnChangeEmail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:backgroundTint="#616161"
|
||||
android:layout_height="wrap_content"
|
||||
android:backgroundTint="@color/text_secondary"
|
||||
android:text="Alterar Email"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:elevation="2dp"
|
||||
android:stateListAnimator="@null" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Password Section -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cardPassword"
|
||||
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="Password"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#1A1A1A"
|
||||
android:layout_marginBottom="16dp" />
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnChangePassword"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:backgroundTint="#616161"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:backgroundTint="@color/text_secondary"
|
||||
android:text="Alterar Password"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:elevation="2dp"
|
||||
android:stateListAnimator="@null" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Save All Changes Button -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cardSaveAll"
|
||||
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">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSaveAll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:backgroundTint="#424242"
|
||||
android:text="Guardar Alterações"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:elevation="2dp"
|
||||
android:stateListAnimator="@null" />
|
||||
android:textColor="@color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -356,10 +310,10 @@
|
||||
android:id="@+id/cardLogout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
app:cardCornerRadius="20dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardBackgroundColor="#FFFFFF"
|
||||
android:layout_marginTop="8dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardBackgroundColor="@color/surface_card"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<LinearLayout
|
||||
@@ -371,14 +325,12 @@
|
||||
<Button
|
||||
android:id="@+id/btnLogout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:backgroundTint="#D32F2F"
|
||||
android:layout_height="wrap_content"
|
||||
android:backgroundTint="@color/live_time"
|
||||
android:text="Terminar Sessão"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:elevation="2dp"
|
||||
android:stateListAnimator="@null" />
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#ECEFF1">
|
||||
android:background="@color/background_light">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -16,7 +16,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Definições"
|
||||
android:textColor="#263238"
|
||||
android:textColor="@color/primary_color"
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="Personaliza a aplicação de acordo com o teu gosto."
|
||||
android:textColor="#546E7A"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
@@ -33,30 +33,32 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:strokeColor="#CFD8DC"
|
||||
app:strokeWidth="1dp">
|
||||
app:cardElevation="2dp"
|
||||
app:cardBackgroundColor="@color/surface_card">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="18dp">
|
||||
android:padding="20dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:contentDescription="@string/menu_definicoes"
|
||||
android:padding="4dp"
|
||||
android:src="@android:drawable/ic_menu_manage" />
|
||||
android:src="@android:drawable/ic_menu_manage"
|
||||
app:tint="@color/primary_color"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -64,7 +66,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Conta"
|
||||
android:textColor="#263238"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@@ -72,7 +74,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Atualiza os teus dados pessoais"
|
||||
android:textColor="#607D8B"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -80,7 +82,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/menu_definicoes"
|
||||
android:src="@android:drawable/ic_media_next" />
|
||||
android:src="@android:drawable/ic_media_next"
|
||||
app:tint="@color/text_secondary"/>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
@@ -89,13 +92,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardUseCompatPadding="true">
|
||||
app:cardElevation="2dp"
|
||||
app:cardBackgroundColor="@color/surface_card">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="18dp">
|
||||
android:padding="20dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -113,7 +117,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Notificações"
|
||||
android:textColor="#263238"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@@ -122,7 +126,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Ativadas"
|
||||
android:textColor="#607D8B"
|
||||
android:textColor="@color/secondary_color"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -136,8 +140,8 @@
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginVertical="12dp"
|
||||
android:background="#ECEFF1" />
|
||||
android:layout_marginVertical="16dp"
|
||||
android:background="@color/divider" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -155,7 +159,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Modo escuro"
|
||||
android:textColor="#263238"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@@ -164,7 +168,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Inativo"
|
||||
android:textColor="#607D8B"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -181,19 +185,20 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardUseCompatPadding="true">
|
||||
app:cardElevation="2dp"
|
||||
app:cardBackgroundColor="@color/surface_card">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="18dp">
|
||||
android:padding="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Ajuda e suporte"
|
||||
android:textColor="#263238"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@@ -202,20 +207,19 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="Consulta a nossa base de conhecimento ou fala connosco."
|
||||
android:textColor="#607D8B"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnOpenSystemSettings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:backgroundTint="#1E88E5"
|
||||
android:layout_marginTop="16dp"
|
||||
android:backgroundTint="@color/primary_light"
|
||||
android:text="Abrir definições do sistema"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="#FFFFFF" />
|
||||
android:textColor="@color/white" />
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user