Modification de l'affichage de fin

This commit is contained in:
2023-04-08 20:09:10 +02:00
parent ece9929f4f
commit 393cc799d3
15 changed files with 321 additions and 316 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-3
View File
@@ -14,9 +14,6 @@
<activity <activity
android:name=".ChoixDuMotDePasse" android:name=".ChoixDuMotDePasse"
android:exported="false" /> android:exported="false" />
<activity
android:name=".FinDePartieActivity"
android:exported="false" />
<activity <activity
android:name=".SettingActivity" android:name=".SettingActivity"
android:exported="false" /> android:exported="false" />
@@ -1,48 +0,0 @@
package com.example.mastermind;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import com.example.mastermind.vue.mastermind.UnePiece;
public class FinDePartieActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_fin_de_partie);
boolean trouve = getIntent().getBooleanExtra("trouve", false);
int[] code = getIntent().getIntArrayExtra("code");
int tours = getIntent().getIntExtra("tour", 0);
if (trouve){
((TextView)findViewById(R.id.texte_gagnant)).setText("Victoire de l'attaquant");
} else {
((TextView)findViewById(R.id.texte_gagnant)).setText("Victoire du défenseur");
}
((UnePiece)findViewById(R.id.reponse_code1)).setColor(code[0]);
((UnePiece)findViewById(R.id.reponse_code2)).setColor(code[1]);
((UnePiece)findViewById(R.id.reponse_code3)).setColor(code[2]);
((UnePiece)findViewById(R.id.reponse_code4)).setColor(code[3]);
if (trouve) {
if (tours == 0) {
((TextView)findViewById(R.id.texte_nombre_coups)).setText("Le défenseur a trouvé le code en 1 tentative");
} else {
((TextView)findViewById(R.id.texte_nombre_coups)).setText("Le défenseur a trouvé le code en " + (tours+1) + " tentatives");
}
}
}
@Override
public void onBackPressed() {
Intent menu=new Intent(this, MenuActivity.class);
this.startActivity(menu);
this.finish();
}
}
@@ -2,7 +2,10 @@ package com.example.mastermind;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
@@ -29,6 +32,9 @@ public class MasterMindActivity extends AppCompatActivity {
private ArrayList<ArrayList<Integer>> corrections; private ArrayList<ArrayList<Integer>> corrections;
// 0 pour personne, 1 pour attaquant, 2 pour défenseur
private int gagnant;
@Override @Override
protected void onCreate(@Nullable Bundle savedInstanceState) { protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
@@ -50,6 +56,8 @@ public class MasterMindActivity extends AppCompatActivity {
b.putInt("tour", 0); b.putInt("tour", 0);
b.putInt("gagnant", 0);
this.combinaisons = new ArrayList<>(); this.combinaisons = new ArrayList<>();
combinaisons.add(new ArrayList<>(0)); combinaisons.add(new ArrayList<>(0));
for (int i=0; i<4; i++) for (int i=0; i<4; i++)
@@ -90,10 +98,10 @@ public class MasterMindActivity extends AppCompatActivity {
if (nextable) { if (nextable) {
if (this.tour < 9) { if (this.tour < 9) {
//on affiche la correction //on affiche la correction
boolean gagne = this.afficherCorrection((LinearLayout) this.jeu.getChildAt(this.tour)); this.afficherCorrection((LinearLayout) this.jeu.getChildAt(this.tour));
//on supprime les listener et sauvegarde la combinaison //on supprime les listener et sauvegarde la combinaison
LinearLayout anciennesPieces = (LinearLayout) this.jeu.getChildAt(this.tour); LinearLayout anciennesPieces = (LinearLayout) this.jeu.getChildAt(this.tour);
ArrayList<Integer> combinaison = new ArrayList<>(); ArrayList<Integer> combinaison = new ArrayList<>();
for (int i = 0; i < anciennesPieces.getChildCount(); i++) { for (int i = 0; i < anciennesPieces.getChildCount(); i++) {
anciennesPieces.getChildAt(i).setOnTouchListener(null); anciennesPieces.getChildAt(i).setOnTouchListener(null);
@@ -101,7 +109,7 @@ public class MasterMindActivity extends AppCompatActivity {
} }
this.combinaisons.add(combinaison); this.combinaisons.add(combinaison);
if (gagne) { if (this.gagnant == 1) {
this.finDePartie(true); this.finDePartie(true);
} else { } else {
//on incremente le tour //on incremente le tour
@@ -117,21 +125,28 @@ public class MasterMindActivity extends AppCompatActivity {
} else { } else {
//on affiche la correction //on affiche la correction
boolean gagne = this.afficherCorrection((LinearLayout) this.jeu.getChildAt(this.tour)); this.afficherCorrection((LinearLayout) this.jeu.getChildAt(this.tour));
//on supprime les listener
if (this.tour > 0) {
LinearLayout anciennesPieces = (LinearLayout) this.jeu.getChildAt(this.tour - 1);
//on supprime les listener et sauvegarde la combinaison
LinearLayout anciennesPieces = (LinearLayout) this.jeu.getChildAt(this.tour);
ArrayList<Integer> combinaison = new ArrayList<>();
for (int i = 0; i < anciennesPieces.getChildCount(); i++) { for (int i = 0; i < anciennesPieces.getChildCount(); i++) {
anciennesPieces.getChildAt(i).setOnTouchListener(null); anciennesPieces.getChildAt(i).setOnTouchListener(null);
combinaison.add(((UnePiece) anciennesPieces.getChildAt(i)).getColor());
} }
this.combinaisons.add(combinaison);
if (this.gagnant == 1) {
this.finDePartie(true);
} else {
this.gagnant = 2;
this.finDePartie(false);
} }
this.finDePartie(gagne);
} }
} }
} }
public boolean afficherCorrection(LinearLayout pieces){ public void afficherCorrection(LinearLayout pieces){
int[] colorpiece=new int[4]; int[] colorpiece=new int[4];
for(int i=0; i<4; i++){ for(int i=0; i<4; i++){
colorpiece[i]=((UnePiece)pieces.getChildAt(i)).getColor(); colorpiece[i]=((UnePiece)pieces.getChildAt(i)).getColor();
@@ -165,20 +180,45 @@ public class MasterMindActivity extends AppCompatActivity {
} }
} }
this.corrections.add(correction); this.corrections.add(correction);
return gagner; if (gagner){
this.gagnant=1;
}
} }
public void finDePartie(boolean trouve){ public void finDePartie(boolean trouve){
Intent fin=new Intent(this, FinDePartieActivity.class); if (trouve){
fin.putExtra("trouve", trouve); if (this.tour == 0) {
fin.putExtra("tour", this.tour); ((TextView) findViewById(R.id.texte_gagnant)).setText("Victoire de l'attaquant en 1 tentative");
fin.putExtra("code", this.code); }else
this.startActivity(fin); ((TextView) findViewById(R.id.texte_gagnant)).setText("Victoire de l'attaquant en " + (this.tour + 1) + " tentatives");
this.finish(); } else {
((TextView)findViewById(R.id.texte_gagnant)).setText("Victoire du défenseur");
}
((UnePiece)findViewById(R.id.reponse_code1)).setColor(this.code[0]);
((UnePiece)findViewById(R.id.reponse_code2)).setColor(this.code[1]);
((UnePiece)findViewById(R.id.reponse_code3)).setColor(this.code[2]);
((UnePiece)findViewById(R.id.reponse_code4)).setColor(this.code[3]);
findViewById(R.id.cache_reponse).setVisibility(View.INVISIBLE);
findViewById(R.id.tour).setVisibility(View.INVISIBLE);
findViewById(R.id.tour).setOnTouchListener(null);
findViewById(R.id.mastermind).setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
Intent intent = new Intent(MasterMindActivity.this, MenuActivity.class);
MasterMindActivity.this.startActivity(intent);
MasterMindActivity.this.finish();
return true;
}
});
} }
public void init(Bundle state){ public void init(Bundle state){
this.tour= state.getInt("tour"); this.tour= state.getInt("tour");
this.gagnant= state.getInt("gagnant");
ArrayList<ArrayList<Integer>> combinaisons = (ArrayList<ArrayList<Integer>>) state.getSerializable("combinaisons"); ArrayList<ArrayList<Integer>> combinaisons = (ArrayList<ArrayList<Integer>>) state.getSerializable("combinaisons");
ArrayList<ArrayList<Integer>> corrections = (ArrayList<ArrayList<Integer>>) state.getSerializable("corrections"); ArrayList<ArrayList<Integer>> corrections = (ArrayList<ArrayList<Integer>>) state.getSerializable("corrections");
@@ -201,6 +241,11 @@ public class MasterMindActivity extends AppCompatActivity {
corrections.remove(this.tour); corrections.remove(this.tour);
this.combinaisons = combinaisons; this.combinaisons = combinaisons;
this.corrections = corrections; this.corrections = corrections;
if (this.gagnant==1){
this.finDePartie(true);
}else if (this.gagnant==2)
this.finDePartie(false);
} }
@Override @Override
@@ -210,6 +255,7 @@ public class MasterMindActivity extends AppCompatActivity {
outState = new Bundle(); outState = new Bundle();
Bundle b = new Bundle(); Bundle b = new Bundle();
b.putInt("tour", this.tour); b.putInt("tour", this.tour);
b.putInt("gagnant", this.gagnant);
ArrayList<Integer> combinaison = new ArrayList<>(); ArrayList<Integer> combinaison = new ArrayList<>();
LinearLayout anciennesPieces =(LinearLayout) this.jeu.getChildAt(this.tour); LinearLayout anciennesPieces =(LinearLayout) this.jeu.getChildAt(this.tour);
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="50dp" />
<solid android:color="@android:color/black" />
<stroke android:color="@android:color/black" android:width="0dp"/>
</shape>
@@ -54,14 +54,17 @@
android:id="@+id/bouton_valider_code" android:id="@+id/bouton_valider_code"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/margeM"
android:text="Valider"
android:textColor="@color/white"
android:textAlignment="center"
android:textSize="@dimen/margeM"
android:background="@color/black"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"/> android:layout_alignParentRight="true"
android:layout_marginStart="@dimen/margeM"
android:layout_marginTop="@dimen/margeM"
android:layout_marginEnd="@dimen/margeM"
android:layout_marginBottom="@dimen/margeM"
android:background="@color/black"
android:text="Valider"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="@dimen/texte" />
</RelativeLayout> </RelativeLayout>
@@ -1,81 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/marron"
>
<TextView
android:id="@+id/titre_fin_de_partie"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Fin de partie"
android:textColor="@color/black"
android:layout_gravity="center"
android:layout_marginTop="50dp"
android:textSize="@dimen/titre"
android:layout_centerHorizontal="true"
/>
<TextView
android:id="@+id/texte_gagnant"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Gagnant"
android:textColor="@color/black"
android:layout_gravity="center"
android:layout_marginTop="30dp"
android:textSize="@dimen/texte"
android:layout_centerHorizontal="true"
android:layout_below="@+id/titre_fin_de_partie"
/>
<LinearLayout
android:id="@+id/reponse_combinaison"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/texte_gagnant"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:orientation="vertical"
>
<TextView
android:id="@+id/reponse_combinaiton_titre"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="La combinaison était :"
android:textColor="@color/black"
android:layout_gravity="center"
android:textSize="@dimen/texte"
android:layout_centerHorizontal="true"
/>
<LinearLayout
android:id="@+id/reponse_combinaison_combinaison"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
>
<com.example.mastermind.vue.mastermind.UnePiece android:id="@+id/reponse_code1" android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:id="@+id/reponse_code2" android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:id="@+id/reponse_code3" android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:id="@+id/reponse_code4" android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/texte_nombre_coups"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textColor="@color/black"
android:layout_gravity="center"
android:layout_marginTop="30dp"
android:textSize="@dimen/texte_petit"
android:layout_centerHorizontal="true"
android:layout_below="@+id/reponse_combinaison"
/>
</RelativeLayout>
+165 -85
View File
@@ -6,110 +6,192 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/marron" android:background="@color/marron"
android:gravity="center_vertical" android:gravity="center_vertical"
android:id="@+id/mastermind"
> >
<RelativeLayout
android:id="@+id/group_reponse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentStart="true"
android:layout_above="@id/group_jeu"
android:layout_marginBottom="15dp"
android:layout_marginTop="15dp"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:orientation="vertical"
>
<TextView
android:id="@+id/texte_gagnant"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Gagnant"
android:layout_marginBottom="15dp"
android:textColor="@color/black"
android:textSize="@dimen/texte"
android:layout_centerHorizontal="true"
android:layout_alignParentTop="true"
/>
<LinearLayout
android:id="@+id/reponse_combinaison"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:layout_below="@id/texte_gagnant"
>
<com.example.mastermind.vue.mastermind.UnePiece android:id="@+id/reponse_code1" android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_marginStart="@dimen/margeM" android:layout_marginEnd="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:id="@+id/reponse_code2" android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_marginStart="@dimen/margeM" android:layout_marginEnd="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:id="@+id/reponse_code3" android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_marginStart="@dimen/margeM" android:layout_marginEnd="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:id="@+id/reponse_code4" android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_marginStart="@dimen/margeM" android:layout_marginEnd="@dimen/margeM"/>
</LinearLayout>
<TextView
android:id="@+id/cache_reponse"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/rounded_corners"
android:textColor="@color/white"
android:text="Combinaison secrète"
android:gravity="center"
android:textSize="@dimen/sous_titre"
/>
</RelativeLayout>
<Button <Button
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_toLeftOf="@+id/correction" android:layout_alignParentStart="true"
android:layout_alignParentLeft="true" android:layout_alignParentEnd="true"
android:layout_marginLeft="@dimen/titre" android:layout_marginLeft="120dp"
android:layout_marginRight="@dimen/titre" android:layout_marginRight="120dp"
android:layout_marginBottom="20dp"
android:layout_marginTop="10dp"
android:id="@+id/tour" android:id="@+id/tour"
android:text="Valider" android:text="Valider"
/> />
<LinearLayout
android:id="@+id/group_jeu"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentLeft="true"
android:gravity="left"
android:orientation="vertical"
android:layout_above="@+id/tour"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Grille" android:text="Tentatives"
android:textSize="@dimen/titre" android:textSize="@dimen/sous_titre"
android:layout_alignParentLeft="true" android:textColor="@color/black"
android:layout_gravity="center"
android:textAlignment="center" android:textAlignment="center"
android:layout_above="@+id/jeu" android:layout_above="@+id/jeu"
/> />
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:id="@+id/jeu" android:id="@+id/jeu"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="left" android:gravity="center"
android:orientation="vertical">
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/group_correction"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentRight="true"
android:gravity="right"
android:orientation="vertical" android:orientation="vertical"
android:layout_above="@+id/tour"> android:layout_above="@+id/tour"
android:layout_marginEnd="10dp"
>
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center">
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece android:layout_width="@dimen/pieceM" android:layout_height="@dimen/pieceM" android:layout_margin="@dimen/margeM"/>
</LinearLayout>
</LinearLayout>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Correction" android:text="Resultats"
android:textSize="@dimen/titre" android:textSize="@dimen/sous_titre"
android:layout_alignParentRight="true" android:layout_gravity="center"
android:textColor="@color/black"
android:layout_toRightOf="@+id/jeu" android:layout_toRightOf="@+id/jeu"
android:layout_above="@+id/correction" android:layout_above="@+id/correction"
android:textAlignment="center" android:textAlignment="center"
@@ -118,12 +200,10 @@
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="right"
android:orientation="vertical" android:orientation="vertical"
android:id="@+id/correction" android:layout_gravity="center"
android:layout_toRightOf="@+id/jeu" android:id="@+id/correction">
android:layout_above="@+id/tour">
<LinearLayout android:layout_width="wrap_content" android:layout_height="@dimen/pieceM" android:gravity="center" android:layout_margin="@dimen/margeM"> <LinearLayout android:layout_width="wrap_content" android:layout_height="@dimen/pieceM" android:gravity="center" android:layout_margin="@dimen/margeM">
@@ -188,5 +268,5 @@
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout>
</RelativeLayout> </RelativeLayout>
+5 -4
View File
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<dimen name="pieceM">30dp</dimen> <dimen name="pieceM">34dp</dimen>
<dimen name="margeM">10dp</dimen> <dimen name="margeM">6dp</dimen>
<dimen name="correction">15dp</dimen> <dimen name="correction">15dp</dimen>
<dimen name="marge_correction">5dp</dimen> <dimen name="marge_correction">5dp</dimen>
<dimen name="titre">30dp</dimen> <dimen name="titre">30dp</dimen>
<dimen name="texte">20dp</dimen> <dimen name="sous_titre">25dp</dimen>
<dimen name="texte_petit">15dp</dimen> <dimen name="texte">18dp</dimen>
<dimen name="texte_petit">10dp</dimen>
</resources> </resources>