Files
Application/app/src/main/res/layout/activity_boidelo_classic_params.xml
T
feldenr c803469643 feat: Ajout du jeu Papelito, améliorations UX et corrections de bugs
Nouveau jeu:
- Ajout du jeu Papelito (Undercover) avec flow complet
- Configuration des joueurs, temps de discussion, votes
- Système d'élimination et gestion des égalités
- Interface Material Design avec cartes et dialogues

Corrections de bugs critiques:
- Fix crash Papelito au lancement (MaterialSwitch vs Switch)
- Fix crash lors des votes nuls (égalité entre joueurs)
- Fix crash fin de partie lors du retour (navigation vers hub)
- Fix visibilité texte questions (couleur dynamique)
- Fix compteur tours défis invisible (blanc sur blanc)
- Fix icone question manquante pendant défis

Améliorations UX Boidelo Classic:
- Harmonisation des couleurs dynamiques (toolbar, bouton)
- Bouton de réglages maintenant visible (MaterialButton)
- Conteneur IA se rétracte quand désactivé
- Meilleure gestion des couleurs selon catégorie
- Fix délai entre manches pour affichage message fin

Améliorations techniques:
- Mise à jour CLAUDE.md avec architecture Papelito
- Amélioration tests unitaires (GameEngine, PlayerStats, QuestionCategory)
- Standardisation des clés Intent entre activités
- Nettoyage code mort (méthodes non utilisées)

Tests:
- 302 tests unitaires passants
- Couverture GameEngine, PlayerStats, QuestionCategory
- Tests Papelito (game logic, player management)
- Tests Game89 (challenges, players)

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-16 12:05:29 +01:00

399 lines
19 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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/surface"
tools:context=".games.boideloclassic.BoideloClassicParamsActivity">
<!-- App Bar -->
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark"/>
<!-- Main Content -->
<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="16dp">
<!-- Title -->
<TextView
android:id="@+id/Titre"
style="@style/BoideloTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:text="@string/param_tres_du_jeu" />
<!-- Game Settings Card -->
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
app:cardBackgroundColor="@color/card_background"
app:cardCornerRadius="16dp"
app:cardElevation="4dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<!-- Number of Questions -->
<TextView
style="@style/BoideloSubtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:text="Paramètres de partie"
app:drawableStartCompat="@android:drawable/ic_menu_edit"
app:drawableTint="@color/primary"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Nombre de questions"
android:textColor="@color/text_primary"
android:textSize="16sp"/>
<TextView
android:id="@+id/questionCountValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_card"
android:paddingStart="12dp"
android:paddingTop="4dp"
android:paddingEnd="12dp"
android:paddingBottom="4dp"
android:text="50"
android:textColor="@color/primary"
android:textSize="14sp"
android:textStyle="bold"/>
</LinearLayout>
<SeekBar
android:id="@+id/seekBar1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:progressTint="@color/accent"
android:thumbTint="@color/accent"/>
</LinearLayout>
<!-- Drink Addition -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Ajout de gorgées"
android:textColor="@color/text_primary"
android:textSize="16sp"/>
<TextView
android:id="@+id/gorgeesValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_card"
android:paddingStart="12dp"
android:paddingTop="4dp"
android:paddingEnd="12dp"
android:paddingBottom="4dp"
android:text="0"
android:textColor="@color/accent"
android:textSize="14sp"
android:textStyle="bold"/>
</LinearLayout>
<SeekBar
android:id="@+id/seekBar2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:progressTint="@color/accent"
android:thumbTint="@color/accent"/>
<!-- Palier Indicator -->
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
app:cardBackgroundColor="@color/surface_variant"
app:cardCornerRadius="8dp"
app:cardElevation="0dp">
<TextView
android:id="@+id/textView5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="12dp"
android:text="Palier : Grosse merde"
android:textColor="@color/text_secondary"
android:textSize="14sp"
android:textStyle="bold"/>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
<!-- Duration of Challenges -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textViewDuration"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Durée des défis"
android:textColor="@color/text_primary"
android:textSize="16sp"/>
<TextView
android:id="@+id/durationValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_card"
android:paddingStart="12dp"
android:paddingTop="4dp"
android:paddingEnd="12dp"
android:paddingBottom="4dp"
android:text="0"
android:textColor="@color/primary"
android:textSize="14sp"
android:textStyle="bold"/>
</LinearLayout>
<SeekBar
android:id="@+id/seekBarDuration"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:progressTint="@color/accent"
android:thumbTint="@color/accent"/>
</LinearLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<!-- OpenAI Settings Card -->
<com.google.android.material.card.MaterialCardView
android:id="@+id/openaiCard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
app:cardBackgroundColor="@color/card_background"
app:cardCornerRadius="16dp"
app:cardElevation="4dp"
app:strokeColor="@color/surface_variant"
app:strokeWidth="1dp">
<LinearLayout
android:id="@+id/openaiCardContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="8dp"
android:src="@android:drawable/ic_menu_edit"
app:tint="@color/primary" />
<TextView
android:id="@+id/textView3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/openai"
android:textColor="@color/text_primary"
android:textSize="18sp"
android:textStyle="bold" />
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/checkBoxGPT"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<!-- Provider Selection -->
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textInputLayoutProvider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:enabled="false"
android:hint="Fournisseur IA"
app:boxBackgroundColor="@color/surface"
app:boxStrokeColor="@color/primary"
app:hintTextColor="@color/text_hint"
style="@style/Widget.Material3.TextInputLayout.OutlinedBox.ExposedDropdownMenu">
<AutoCompleteTextView
android:id="@+id/autoCompleteProvider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="none"
android:text="OpenAI" />
</com.google.android.material.textfield.TextInputLayout>
<!-- API Key Input -->
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textInputLayoutApiKey"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:hint="Clé API"
app:boxBackgroundColor="@color/surface"
app:boxStrokeColor="@color/primary"
app:endIconMode="password_toggle"
app:hintTextColor="@color/text_hint"
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/editTextGPT"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:maxLines="1" />
</com.google.android.material.textfield.TextInputLayout>
<!-- Ratio SeekBar -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textViewRatioGen"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:enabled="false"
android:text="Ratio BDD/OPENAI : 1/8"
android:textColor="@color/text_primary"
android:textSize="14sp" />
</LinearLayout>
<SeekBar
android:id="@+id/seekBar3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:enabled="false"
android:progressTint="@color/accent"
android:thumbTint="@color/accent" />
</LinearLayout>
<!-- Test API Button -->
<com.google.android.material.button.MaterialButton
android:id="@+id/ButtonTestApi"
style="@style/BoideloButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:enabled="false"
android:onClick="onClickButtonTestAPI"
android:text="@string/test_de_connectivit_openai"
app:backgroundTint="@color/surface_variant"
app:icon="@android:drawable/ic_menu_info_details"
app:iconGravity="textStart" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<!-- Start Game Button -->
<com.google.android.material.button.MaterialButton
android:id="@+id/Go2"
android:layout_width="match_parent"
android:layout_height="64dp"
android:layout_marginTop="24dp"
android:layout_marginBottom="32dp"
android:onClick="onClickButtonStart"
android:text="@string/commencer_a_vous_mettre_une_mine"
android:textColor="@color/text_on_primary"
android:textSize="18sp"
android:textStyle="bold"
app:backgroundTint="@color/primary"
app:cornerRadius="16dp"
app:icon="@android:drawable/ic_media_play"
app:iconTint="@color/text_on_primary"
app:iconGravity="textStart"
android:elevation="8dp" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>