253 lines
11 KiB
XML
253 lines
11 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.coordinatorlayout.widget.CoordinatorLayout 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:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:background="@color/card_background"
|
|
app:elevation="0dp">
|
|
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="64dp"
|
|
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:id="@+id/tvToolbarTitle"
|
|
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" />
|
|
</RelativeLayout>
|
|
</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">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="20dp">
|
|
|
|
<!-- 1. 🥇 HEADER DA LIGA -->
|
|
<androidx.cardview.widget.CardView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="20dp"
|
|
app:cardCornerRadius="16dp"
|
|
app:cardElevation="2dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="20dp"
|
|
android:gravity="center">
|
|
|
|
<ImageView
|
|
android:id="@+id/ivLeagueBadge"
|
|
android:layout_width="80dp"
|
|
android:layout_height="80dp"
|
|
android:src="@drawable/ic_trophy_bronze"
|
|
android:layout_marginBottom="12dp"/>
|
|
|
|
<TextView
|
|
android:id="@+id/tvLeagueName"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Divisão Bronze"
|
|
android:textColor="@color/text_primary"
|
|
android:textSize="22sp"
|
|
android:textStyle="bold" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvLeagueTimeRemaining"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="4dp"
|
|
android:text="2 dias 14h restantes"
|
|
android:textColor="@color/text_secondary"
|
|
android:textSize="14sp" />
|
|
|
|
<ProgressBar
|
|
android:id="@+id/pbWeeklyProgress"
|
|
style="?android:attr/progressBarStyleHorizontal"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="8dp"
|
|
android:layout_marginTop="16dp"
|
|
android:max="100"
|
|
android:progress="60"
|
|
android:progressDrawable="@drawable/progress_bar_duo" />
|
|
</LinearLayout>
|
|
</androidx.cardview.widget.CardView>
|
|
|
|
<!-- 2. 🎯 OBJETIVO DA LIGA -->
|
|
<TextView
|
|
android:id="@+id/tvLeagueObjective"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="Fica no TOP 3 para subir para Prata"
|
|
android:textAlignment="center"
|
|
android:textColor="@color/primary_purple"
|
|
android:textStyle="bold"
|
|
android:textSize="16sp"
|
|
android:layout_marginBottom="24dp"/>
|
|
|
|
<!-- 8. 👥 FILTRO DE RANKING -->
|
|
<com.google.android.material.button.MaterialButtonToggleGroup
|
|
android:id="@+id/toggleRankingFilter"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_marginBottom="20dp"
|
|
app:singleSelection="true"
|
|
app:checkedButton="@+id/btnRankingGlobal">
|
|
<Button
|
|
android:id="@+id/btnRankingGlobal"
|
|
style="?attr/materialButtonOutlinedStyle"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Global"
|
|
android:textSize="12sp"/>
|
|
<Button
|
|
android:id="@+id/btnRankingAmigos"
|
|
style="?attr/materialButtonOutlinedStyle"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Amigos"
|
|
android:textSize="12sp"/>
|
|
</com.google.android.material.button.MaterialButtonToggleGroup>
|
|
|
|
<!-- 3. 📊 RANKING DA SEMANA -->
|
|
<LinearLayout
|
|
android:id="@+id/rankingContainer"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:layout_marginBottom="24dp"/>
|
|
|
|
<!-- 5. ⚡ PROGRESSO DO UTILIZADOR -->
|
|
<androidx.cardview.widget.CardView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="24dp"
|
|
app:cardCornerRadius="16dp"
|
|
app:cardElevation="2dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="16dp">
|
|
|
|
<TextView
|
|
android:id="@+id/tvUserRankingStatus"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Faltam 120 XP para entrares no TOP 3"
|
|
android:textColor="@color/text_primary"
|
|
android:textStyle="bold"
|
|
android:textSize="14sp"/>
|
|
|
|
<TextView
|
|
android:id="@+id/tvXPToNextPosition"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="4dp"
|
|
android:text="Diferença para o próximo: 45 XP"
|
|
android:textColor="@color/text_secondary"
|
|
android:textSize="12sp"/>
|
|
</LinearLayout>
|
|
</androidx.cardview.widget.CardView>
|
|
|
|
<!-- 6. 🎁 RECOMPENSAS DA SEMANA -->
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Recompensas da semana"
|
|
android:textStyle="bold"
|
|
android:textSize="18sp"
|
|
android:textColor="@color/text_primary"
|
|
android:layout_marginBottom="12dp"/>
|
|
|
|
<androidx.cardview.widget.CardView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="24dp"
|
|
app:cardCornerRadius="16dp"
|
|
app:cardElevation="1dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="12dp">
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="🥇 1º lugar: +300 XP + Badge Exclusiva"
|
|
android:padding="8dp"
|
|
android:textColor="@color/text_primary"/>
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="🥈 2º lugar: +200 XP"
|
|
android:padding="8dp"
|
|
android:textColor="@color/text_primary"/>
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="🥉 3º lugar: +100 XP"
|
|
android:padding="8dp"
|
|
android:textColor="@color/text_primary"/>
|
|
</LinearLayout>
|
|
</androidx.cardview.widget.CardView>
|
|
|
|
<!-- 7. 📈 HISTÓRICO DE PERFORMANCE -->
|
|
<TextView
|
|
android:id="@+id/tvPastPerformance"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="Semana passada: 2º lugar (subiste)"
|
|
android:textAlignment="center"
|
|
android:textColor="@color/text_secondary"
|
|
android:textSize="14sp"
|
|
android:layout_marginBottom="32dp"/>
|
|
|
|
<!-- 9. 🔘 BOTÃO DE ACÇÃO -->
|
|
<Button
|
|
android:id="@+id/btnEarnXpNow"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="56dp"
|
|
android:text="Ganhar XP agora"
|
|
android:background="@drawable/button_primary"
|
|
android:textColor="@color/white"
|
|
android:textStyle="bold"
|
|
android:textAllCaps="false"
|
|
app:backgroundTint="@null"
|
|
android:layout_marginBottom="40dp"/>
|
|
|
|
</LinearLayout>
|
|
</androidx.core.widget.NestedScrollView>
|
|
|
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|