Files
PapF/app/src/main/res/layout/activity_trophies.xml
MeuNome 01b54cd8d0 erro
2026-05-18 11:36:22 +01:00

273 lines
11 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:background="@color/background_light">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/card_background"
app:elevation="0dp">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="64dp"
app:contentInsetStart="0dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingHorizontal="16dp">
<ImageButton
android:id="@+id/btnBack"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_centerVertical="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_back"
app:tint="@color/text_primary" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="Ligas"
android:textColor="@color/text_primary"
android:textSize="20sp"
android:textStyle="bold" />
<ImageButton
android:id="@+id/btnHelp"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:src="@android:drawable/ic_menu_help"
app:tint="@color/text_primary" />
</RelativeLayout>
</androidx.appcompat.widget.Toolbar>
<!-- Gamified Header Section -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="20dp"
android:gravity="center">
<ImageView
android:id="@+id/ivHeaderLeagueIcon"
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/ic_trophy_bronze"
android:layout_marginBottom="12dp" />
<TextView
android:id="@+id/tvHeaderTimeLeft"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Termina em 3 dias"
android:textColor="@color/text_secondary"
android:textSize="14sp"
android:layout_marginBottom="8dp"/>
<ProgressBar
android:id="@+id/pbHeaderProgress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="12dp"
android:max="100"
android:progress="0"
android:progressTint="@color/primary_purple"
android:progressBackgroundTint="#E0E0E0" />
<TextView
android:id="@+id/tvHeaderXP"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="6415 / 10000 XP"
android:textColor="@color/text_primary"
android:textStyle="bold"
android:layout_marginTop="8dp"/>
</LinearLayout>
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="fixed"
app:tabGravity="fill"
app:tabIndicatorColor="@color/primary_purple"
app:tabSelectedTextColor="@color/primary_purple"
app:tabTextColor="@color/text_secondary">
<com.google.android.material.tabs.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Divisões" />
<com.google.android.material.tabs.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Amigos" />
<com.google.android.material.tabs.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Ranking" />
</com.google.android.material.tabs.TabLayout>
</com.google.android.material.appbar.AppBarLayout>
<FrameLayout
android:id="@+id/contentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/appBar"
android:layout_above="@id/bottomWrapper">
<!-- DIVISÕES TAB -->
<androidx.core.widget.NestedScrollView
android:id="@+id/tabDivisoes"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:padding="16dp">
<LinearLayout
android:id="@+id/divisionsContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
</androidx.core.widget.NestedScrollView>
<!-- RANKING / AMIGOS TAB -->
<androidx.core.widget.NestedScrollView
android:id="@+id/tabRanking"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
android:clipToPadding="false"
android:padding="16dp">
<LinearLayout
android:id="@+id/rankingContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
</androidx.core.widget.NestedScrollView>
</FrameLayout>
<LinearLayout
android:id="@+id/bottomWrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical"
android:background="@color/card_background"
android:elevation="12dp">
<!-- Fixed User Card -->
<androidx.cardview.widget.CardView
android:id="@+id/cardUserProgress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardElevation="0dp"
app:cardBackgroundColor="@color/card_background">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp">
<androidx.cardview.widget.CardView
android:id="@+id/cvAvatar"
android:layout_width="48dp"
android:layout_height="48dp"
app:cardCornerRadius="24dp"
app:cardElevation="0dp">
<com.fluxup.app.AvatarView
android:id="@+id/ivUserAvatar"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.cardview.widget.CardView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toEndOf="@id/cvAvatar"
android:layout_toStartOf="@id/ivUserExpand"
android:layout_marginStart="16dp"
android:orientation="vertical">
<TextView
android:id="@+id/tvUserName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Utilizador"
android:textColor="@color/text_primary"
android:textStyle="bold"
android:textSize="16sp"/>
<TextView
android:id="@+id/tvUserDivision"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Bronze • 0 XP"
android:textColor="@color/text_secondary"
android:textSize="14sp"/>
<ProgressBar
android:id="@+id/pbUserBottom"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="8dp"
android:layout_marginTop="4dp"
android:max="100"
android:progress="0"
android:progressTint="@color/primary_purple"
android:progressBackgroundTint="#E0E0E0" />
</LinearLayout>
<ImageView
android:id="@+id/ivUserExpand"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:src="@drawable/ic_arrow_right"
app:tint="@color/text_secondary" />
</RelativeLayout>
</androidx.cardview.widget.CardView>
<Button
android:id="@+id/btnEarnXpNow"
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_marginHorizontal="16dp"
android:layout_marginBottom="16dp"
android:text="Ganhar XP agora"
android:backgroundTint="@color/primary_purple"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold"
android:textAllCaps="false"
app:cornerRadius="12dp" />
</LinearLayout>
</RelativeLayout>