From 405c41e2d3226aa27237562dfc2c6eefee06d933 Mon Sep 17 00:00:00 2001 From: Claire G Date: Thu, 6 Apr 2023 10:28:24 +0200 Subject: [PATCH] Modif responsif sur la hauteur --- .../com/example/mastermind/game/GameView.java | 19 +++++++------------ .../mastermind/game/TouchListener.java | 2 +- app/src/main/res/layout/activity_main.xml | 3 ++- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/com/example/mastermind/game/GameView.java b/app/src/main/java/com/example/mastermind/game/GameView.java index 21110d6..d7f1fd5 100644 --- a/app/src/main/java/com/example/mastermind/game/GameView.java +++ b/app/src/main/java/com/example/mastermind/game/GameView.java @@ -5,8 +5,6 @@ import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.view.View; -import android.widget.LinearLayout; -import android.widget.TableLayout; import com.example.mastermind.R; @@ -18,12 +16,6 @@ public class GameView extends View { private Collection pionsAttaquant; private Collection pionsDefenseur; private Collection pionsPasPlaces; - private TableLayout grilleView; - private TableLayout notation1View; - private TableLayout notation2View; - private LinearLayout buttonsView; - private LinearLayout choixView; - private LinearLayout selectionView; private Saisie saisie; private Grille grille; private Paint circle; @@ -53,7 +45,7 @@ public class GameView extends View { for (int x=0;x<4;x++) { this.circle.setColor(grille.pop()); //TODO: coordonnées propres - canvas.drawCircle(( x*this.getWidth()/8+(this.getWidth()*21/68)),(y*this.getWidth()/8+this.getWidth()/10), this.getWidth()/17, this.circle); + canvas.drawCircle(( x*this.getWidth()/8+(this.getWidth()*21/68)),(y*this.getHeight()/14+this.getHeight()/21), this.getWidth()/17, this.circle); } } // affichage de la zone de saisie @@ -63,7 +55,7 @@ public class GameView extends View { for (int i=0;i + tools:context=".MainActivity" + >