debut mise en page MasterMind, ajout de mouvement et de la piece vide

This commit is contained in:
martins 2023-04-07 14:29:23 +02:00
parent b97998c1f7
commit 17f16b35d7
11 changed files with 306 additions and 69 deletions

View File

@ -26,10 +26,11 @@ public class ChoixDuMotDePasse extends AppCompatActivity {
this.trois=(UnePiece) this.findViewById(R.id.code3); this.trois=(UnePiece) this.findViewById(R.id.code3);
this.quatre=(UnePiece) this.findViewById(R.id.code4); this.quatre=(UnePiece) this.findViewById(R.id.code4);
this.un.setOnTouchListener(new MonOnTouchListener(this.un)); boolean t=this.getIntent().getBooleanExtra("vide", false);
this.deux.setOnTouchListener(new MonOnTouchListener(this.deux)); this.un.setOnTouchListener(new MonOnTouchListener(this.un, t));
this.trois.setOnTouchListener(new MonOnTouchListener(this.trois)); this.deux.setOnTouchListener(new MonOnTouchListener(this.deux, t));
this.quatre.setOnTouchListener(new MonOnTouchListener(this.quatre)); this.trois.setOnTouchListener(new MonOnTouchListener(this.trois, t));
this.quatre.setOnTouchListener(new MonOnTouchListener(this.quatre, t));
this.findViewById(R.id.bouton_valider_code).setOnTouchListener(new OnTouchBoutonValider(this)); this.findViewById(R.id.bouton_valider_code).setOnTouchListener(new OnTouchBoutonValider(this));

View File

@ -2,21 +2,31 @@ package com.example.mastermind;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import com.example.mastermind.controller.mastermind.MonOnTouchListener;
import com.example.mastermind.vue.mastermind.UnePiece;
public class MasterMindActivity extends AppCompatActivity { public class MasterMindActivity extends AppCompatActivity {
private int[] code;
@Override @Override
protected void onCreate(@Nullable Bundle savedInstanceState) { protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_master_mind); setContentView(R.layout.activity_master_mind);
Intent data=this.getIntent(); Intent data=this.getIntent();
System.out.println(data.getBooleanExtra("vide", false)); this.code=data.getIntArrayExtra("code");
int tab[]=data.getIntArrayExtra("code"); LinearLayout l=this.findViewById(R.id.jeu);
for(int i : tab){
System.out.println(i); for(int i=0; i<l.getChildCount(); i++){
LinearLayout fils = (LinearLayout) l.getChildAt(i);
for(int j=0; j<fils.getChildCount(); j++){
fils.getChildAt(j).setOnTouchListener(new MonOnTouchListener((UnePiece) fils.getChildAt(j), data.getBooleanExtra("vide", false)));
}
} }
} }

View File

@ -28,8 +28,7 @@ public class MonGestureListener implements GestureDetector.OnGestureListener {
@Override @Override
public boolean onSingleTapUp(@NonNull MotionEvent motionEvent) { public boolean onSingleTapUp(@NonNull MotionEvent motionEvent) {
this.vue.setColor(5); return false;
return true;
} }
@Override @Override
@ -39,47 +38,28 @@ public class MonGestureListener implements GestureDetector.OnGestureListener {
@Override @Override
public void onLongPress(@NonNull MotionEvent motionEvent) { public void onLongPress(@NonNull MotionEvent motionEvent) {
this.vue.setColor(4); this.vue.setColor(6);
} }
@Override @Override
public boolean onFling(@NonNull MotionEvent motionEvent, @NonNull MotionEvent motionEvent1, float v, float v1) { public boolean onFling(@NonNull MotionEvent motionEvent, @NonNull MotionEvent motionEvent1, float v, float v1) {
if(v>0 && v1>0){ if (Math.abs(v) > Math.abs(v1)) {
if(v>v1){ if (v > 0) {
//slide a droit plus fort // slide à droite
this.vue.setColor(2); this.vue.setColor(2);
} else { } else {
//slide en bas plus fort // slide à gauche
this.vue.setColor(1);
}
}
if(v>0 && v1<0){
if(v+v1 >0){
//slide a droit plus fort
this.vue.setColor(2);
}else{
//slide en haut plus fort
this.vue.setColor(1);
}
}
if(v<0 && v1>0){
if((v+v1) < 0){
//slide a gauche plus fort
this.vue.setColor(0); this.vue.setColor(0);
}
} else { } else {
//slide en bas plus fort if (v1 > 0) {
// slide en bas
this.vue.setColor(1);
} else {
// slide en haut
this.vue.setColor(3); this.vue.setColor(3);
} }
} }
if(v<0 && v1<0){
if(v < v1){
//slide gauche plus fort
this.vue.setColor(0);
}else{
//slide en haut plus fort
this.vue.setColor(1);
}
}
return true; return true;
} }
} }

View File

@ -0,0 +1,32 @@
package com.example.mastermind.controller.mastermind;
import android.view.GestureDetector;
import android.view.MotionEvent;
import androidx.annotation.NonNull;
import com.example.mastermind.vue.mastermind.UnePiece;
public class MonOnDoubleTapListener implements GestureDetector.OnDoubleTapListener {
private UnePiece v;
public MonOnDoubleTapListener(UnePiece p){
this.v=p;
}
@Override
public boolean onSingleTapConfirmed(@NonNull MotionEvent motionEvent) {
this.v.setColor(5);
return true;
}
@Override
public boolean onDoubleTap(@NonNull MotionEvent motionEvent) {
this.v.setColor(4);
return true;
}
@Override
public boolean onDoubleTapEvent(@NonNull MotionEvent motionEvent) {
return false;
}
}

View File

@ -1,19 +1,22 @@
package com.example.mastermind.controller.mastermind; package com.example.mastermind.controller.mastermind;
import android.content.Context;
import android.view.GestureDetector; import android.view.GestureDetector;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
import android.view.View; import android.view.View;
import com.example.mastermind.R;
import com.example.mastermind.vue.mastermind.UnePiece; import com.example.mastermind.vue.mastermind.UnePiece;
public class MonOnTouchListener implements View.OnTouchListener { public class MonOnTouchListener implements View.OnTouchListener {
private GestureDetector detector; private GestureDetector detector;
private MonGestureListener listener; public MonOnTouchListener(UnePiece p, boolean t){
public MonOnTouchListener(UnePiece p){ this.detector=new GestureDetector(new MonGestureListener(p));
this.listener=new MonGestureListener(p); this.detector.setOnDoubleTapListener(new MonOnDoubleTapListener(p));
this.detector=new GestureDetector(this.listener); if(t==false){
this.detector.setIsLongpressEnabled(t);
}
} }
@Override @Override

View File

@ -10,6 +10,8 @@ public abstract class MonPaint {
private static Paint blanche; private static Paint blanche;
private static Paint noir; private static Paint noir;
private static Paint vide;
private static void istanciate(){ private static void istanciate(){
MonPaint.rouge=new Paint(); MonPaint.rouge=new Paint();
MonPaint.rouge.setColor(0xffff0000); MonPaint.rouge.setColor(0xffff0000);
@ -28,6 +30,11 @@ public abstract class MonPaint {
MonPaint.noir=new Paint(); MonPaint.noir=new Paint();
MonPaint.noir.setColor(0xff000000); MonPaint.noir.setColor(0xff000000);
MonPaint.vide=new Paint();
MonPaint.vide.setColor(0xFF000000);
MonPaint.vide.setStyle(Paint.Style.STROKE);
MonPaint.vide.setStrokeWidth(5.0f);
} }
public static Paint getVerte(){ public static Paint getVerte(){
@ -72,6 +79,13 @@ public abstract class MonPaint {
return MonPaint.noir; return MonPaint.noir;
} }
public static Paint getVide(){
if(MonPaint.vide== null){
MonPaint.istanciate();
}
return MonPaint.vide;
}
public static Paint getColor(int n){ public static Paint getColor(int n){
switch (n){ switch (n){
case 0: case 0:
@ -89,7 +103,8 @@ public abstract class MonPaint {
case 5: case 5:
return MonPaint.getBlanche(); return MonPaint.getBlanche();
case 6:
return MonPaint.getVide();
default: default:
return null; return null;
} }

View File

@ -0,0 +1,18 @@
package com.example.mastermind.vue.mastermind;
import android.content.Context;
import android.util.AttributeSet;
import androidx.annotation.Nullable;
public class PieceCorrection extends UnePiece{
public PieceCorrection(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}
@Override
protected int getRaduis() {
return 20;
}
}

View File

@ -24,18 +24,22 @@ public class UnePiece extends View {
super.onDraw(canvas); super.onDraw(canvas);
int centerX = getWidth() / 2; int centerX = getWidth() / 2;
int centerY = getHeight() / 2; int centerY = getHeight() / 2;
int radius = 50; int radius = this.getRaduis();
canvas.drawCircle(centerX, centerY, radius, MonPaint.getColor(this.color)); canvas.drawCircle(centerX, centerY, radius, MonPaint.getColor(this.color));
} }
protected int getRaduis() {
return 40;
}
public int getColor() { public int getColor() {
return color; return color;
} }
public void setColor(int colorr) { public void setColor(int colorr) {
this.color = colorr%6; this.color = colorr%7;
this.invalidate(); this.invalidate();
} }
} }

View File

@ -18,29 +18,29 @@
<com.example.mastermind.vue.mastermind.UnePiece <com.example.mastermind.vue.mastermind.UnePiece
android:id="@+id/code1" android:id="@+id/code1"
android:layout_width="@dimen/piece" android:layout_width="@dimen/pieceM"
android:layout_height="@dimen/piece" android:layout_height="@dimen/pieceM"
android:layout_margin="@dimen/marge"/> android:layout_margin="@dimen/margeM"/>
<com.example.mastermind.vue.mastermind.UnePiece <com.example.mastermind.vue.mastermind.UnePiece
android:id="@+id/code2" android:id="@+id/code2"
android:layout_width="@dimen/piece" android:layout_width="@dimen/pieceM"
android:layout_height="@dimen/piece" android:layout_height="@dimen/pieceM"
android:layout_margin="@dimen/marge" android:layout_margin="@dimen/margeM"
android:layout_toRightOf="@id/code1"/> android:layout_toRightOf="@id/code1"/>
<com.example.mastermind.vue.mastermind.UnePiece <com.example.mastermind.vue.mastermind.UnePiece
android:id="@+id/code3" android:id="@+id/code3"
android:layout_width="@dimen/piece" android:layout_width="@dimen/pieceM"
android:layout_height="@dimen/piece" android:layout_height="@dimen/pieceM"
android:layout_margin="@dimen/marge" android:layout_margin="@dimen/margeM"
android:layout_toRightOf="@id/code2"/> android:layout_toRightOf="@id/code2"/>
<com.example.mastermind.vue.mastermind.UnePiece <com.example.mastermind.vue.mastermind.UnePiece
android:id="@+id/code4" android:id="@+id/code4"
android:layout_width="@dimen/piece" android:layout_width="@dimen/pieceM"
android:layout_height="@dimen/piece" android:layout_height="@dimen/pieceM"
android:layout_margin="@dimen/marge" android:layout_margin="@dimen/margeM"
android:layout_toRightOf="@id/code3"/> android:layout_toRightOf="@id/code3"/>
@ -54,11 +54,11 @@
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/marge" android:layout_margin="@dimen/margeM"
android:text="Valider" android:text="Valider"
android:textColor="@color/white" android:textColor="@color/white"
android:textAlignment="center" android:textAlignment="center"
android:textSize="@dimen/marge" android:textSize="@dimen/margeM"
android:background="@color/black" android:background="@color/black"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"/> android:layout_alignParentRight="true"/>

View File

@ -1,9 +1,180 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".MasterMindActivity"> android:background="@color/marron"
android:gravity="center_vertical"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Grille"
android:textSize="@dimen/titre"
android:layout_alignParentLeft="true"
android:textAlignment="center"
android:layout_above="@+id/jeu"
/>
</androidx.constraintlayout.widget.ConstraintLayout> <LinearLayout
android:layout_width="wrap_content"
android:id="@+id/jeu"
android:layout_height="wrap_content"
android:gravity="left"
android:orientation="vertical"
android:layout_alignParentBottom="true">
<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
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Correction"
android:textSize="@dimen/titre"
android:layout_alignParentRight="true"
android:layout_toRightOf="@+id/jeu"
android:layout_above="@+id/correction"
android:textAlignment="center"
/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:orientation="vertical"
android:id="@+id/correction"
android:layout_toRightOf="@+id/jeu"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true">
<LinearLayout android:layout_width="wrap_content" android:layout_height="@dimen/pieceM" android:gravity="center" android:layout_margin="@dimen/margeM">
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="@dimen/pieceM" android:gravity="center" android:layout_margin="@dimen/margeM">
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="@dimen/pieceM" android:gravity="center" android:layout_margin="@dimen/margeM">
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="@dimen/pieceM" android:gravity="center" android:layout_margin="@dimen/margeM">
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="@dimen/pieceM" android:gravity="center" android:layout_margin="@dimen/margeM">
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="@dimen/pieceM" android:gravity="center" android:layout_margin="@dimen/margeM">
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="@dimen/pieceM" android:gravity="center" android:layout_margin="@dimen/margeM">
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="@dimen/pieceM" android:gravity="center" android:layout_margin="@dimen/margeM">
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="@dimen/pieceM" android:gravity="center" android:layout_margin="@dimen/margeM">
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="@dimen/pieceM" android:gravity="center" android:layout_margin="@dimen/margeM">
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
<com.example.mastermind.vue.mastermind.PieceCorrection android:layout_width="@dimen/correction" android:layout_height="@dimen/correction" android:layout_margin="@dimen/marge_correction"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>

View File

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<dimen name="piece">50dp</dimen> <dimen name="pieceM">40dp</dimen>
<dimen name="marge">20dp</dimen> <dimen name="margeM">10dp</dimen>
<dimen name="correction">20dp</dimen>
<dimen name="marge_correction">5dp</dimen>
<dimen name="titre">30dp</dimen>
</resources> </resources>