Commit 95306d0939e8dbee46f3719b3cdaeb705c914aab

Authored by aarnaude
1 parent aaefb55f

résolution bug sur l'activité bravo

app/src/main/java/tonio/noa/TutorialScene3Activity.java
@@ -16,6 +16,7 @@ import android.widget.ImageView; @@ -16,6 +16,7 @@ import android.widget.ImageView;
16 public class TutorialScene3Activity extends MyPlayActivity implements View.OnTouchListener, View.OnDragListener { 16 public class TutorialScene3Activity extends MyPlayActivity implements View.OnTouchListener, View.OnDragListener {
17 17
18 private int win_counter = 0; 18 private int win_counter = 0;
  19 + private boolean done = false;
19 20
20 @Override 21 @Override
21 protected void onCreate(Bundle savedInstanceState) { 22 protected void onCreate(Bundle savedInstanceState) {
@@ -85,7 +86,7 @@ public class TutorialScene3Activity extends MyPlayActivity implements View.OnTou @@ -85,7 +86,7 @@ public class TutorialScene3Activity extends MyPlayActivity implements View.OnTou
85 86
86 // the drag and drop operation has concluded 87 // the drag and drop operation has concluded
87 case DragEvent.ACTION_DRAG_ENDED: 88 case DragEvent.ACTION_DRAG_ENDED:
88 - if (win_counter == 3) bravoPage(v); 89 + if (win_counter == 3 && !done){done=true; bravoPage(v);}
89 break; 90 break;
90 91
91 //drag shadow has been released,the drag point is within the bounding box of the View 92 //drag shadow has been released,the drag point is within the bounding box of the View
app/src/main/java/tonio/noa/TutorialScene4Activity.java
@@ -15,6 +15,7 @@ import android.view.View; @@ -15,6 +15,7 @@ import android.view.View;
15 public class TutorialScene4Activity extends MyPlayActivity implements View.OnTouchListener, View.OnDragListener { 15 public class TutorialScene4Activity extends MyPlayActivity implements View.OnTouchListener, View.OnDragListener {
16 16
17 private int win_counter = 0; 17 private int win_counter = 0;
  18 + private boolean done = false;
18 19
19 @Override 20 @Override
20 protected void onCreate(Bundle savedInstanceState) { 21 protected void onCreate(Bundle savedInstanceState) {
@@ -100,7 +101,10 @@ public class TutorialScene4Activity extends MyPlayActivity implements View.OnTou @@ -100,7 +101,10 @@ public class TutorialScene4Activity extends MyPlayActivity implements View.OnTou
100 101
101 // the drag and drop operation has concluded 102 // the drag and drop operation has concluded
102 case DragEvent.ACTION_DRAG_ENDED: 103 case DragEvent.ACTION_DRAG_ENDED:
103 - if (win_counter == 12) bravoPage(v); 104 + if (win_counter == 12 && !done) {
  105 + done = true;
  106 + bravoPage(v);
  107 + }
104 break; 108 break;
105 109
106 //drag shadow has been released,the drag point is within the bounding box of the View 110 //drag shadow has been released,the drag point is within the bounding box of the View
app/src/main/java/tonio/noa/TutorialScene5Activity.java
@@ -12,6 +12,7 @@ import android.view.View; @@ -12,6 +12,7 @@ import android.view.View;
12 public class TutorialScene5Activity extends MyPlayActivity implements View.OnTouchListener { 12 public class TutorialScene5Activity extends MyPlayActivity implements View.OnTouchListener {
13 13
14 private int win_counter = 0; 14 private int win_counter = 0;
  15 + private boolean done = false;
15 16
16 @Override 17 @Override
17 protected void onCreate(Bundle savedInstanceState) { 18 protected void onCreate(Bundle savedInstanceState) {
@@ -56,7 +57,8 @@ public class TutorialScene5Activity extends MyPlayActivity implements View.OnTou @@ -56,7 +57,8 @@ public class TutorialScene5Activity extends MyPlayActivity implements View.OnTou
56 } else view.setBackgroundColor(0xff888888); 57 } else view.setBackgroundColor(0xff888888);
57 return true; 58 return true;
58 } 59 }
59 - if (win_counter == 4) { 60 + if (win_counter == 4 && !done) {
  61 + done = true;
60 this.bravoPage(null); 62 this.bravoPage(null);
61 return true; 63 return true;
62 } else 64 } else