Files
cuidamais/app/src/main/res/layout/fragment_profile.xml

130 lines
4.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="24dp"
android:gravity="center_horizontal"
android:background="@color/background_color">
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/profile_image"
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/ic_placeholder"
android:scaleType="centerCrop"
app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.App.CornerSize50Percent"
android:layout_marginBottom="24dp"/>
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardElevation="8dp"
app:cardCornerRadius="24dp"
app:cardBackgroundColor="@color/surface_color"
android:layout_marginBottom="32dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="24dp"
android:gravity="center">
<TextView
android:id="@+id/profile_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Nome do Utilizador"
android:textSize="22sp"
android:textStyle="bold"
android:textColor="@color/text_primary"
android:layout_marginBottom="8dp"/>
<TextView
android:id="@+id/profile_email"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="email@exemplo.com"
android:textSize="14sp"
android:textColor="@color/text_secondary"
android:layout_marginBottom="24dp"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#E0E0E0"
android:layout_marginBottom="16dp"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
android:layout_marginBottom="12dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Idade: "
android:textSize="16sp"
android:textColor="@color/text_secondary"/>
<TextView
android:id="@+id/profile_age"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="--"
android:textSize="18sp"
android:textStyle="bold"
android:textColor="@color/text_primary"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Nº Utente: "
android:textSize="16sp"
android:textColor="@color/text_secondary"/>
<TextView
android:id="@+id/profile_utente"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="--"
android:textSize="18sp"
android:textStyle="bold"
android:textColor="@color/text_primary"/>
</LinearLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.button.MaterialButton
android:id="@+id/button_edit_profile"
android:layout_width="match_parent"
android:layout_height="60dp"
android:text="Editar Dados"
android:layout_marginBottom="16dp"
android:backgroundTint="@color/secondary_color"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/button_logout"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="match_parent"
android:layout_height="60dp"
android:text="Terminar Sessão"
app:strokeColor="@color/error_color"
android:textColor="@color/error_color"/>
</LinearLayout>