Commit 95306d0939e8dbee46f3719b3cdaeb705c914aab
1 parent
aaefb55f
résolution bug sur l'activité bravo
Showing
3 changed files
with
10 additions
and
3 deletions
Show diff stats
app/src/main/java/tonio/noa/TutorialScene3Activity.java
... | ... | @@ -16,6 +16,7 @@ import android.widget.ImageView; |
16 | 16 | public class TutorialScene3Activity extends MyPlayActivity implements View.OnTouchListener, View.OnDragListener { |
17 | 17 | |
18 | 18 | private int win_counter = 0; |
19 | + private boolean done = false; | |
19 | 20 | |
20 | 21 | @Override |
21 | 22 | protected void onCreate(Bundle savedInstanceState) { |
... | ... | @@ -85,7 +86,7 @@ public class TutorialScene3Activity extends MyPlayActivity implements View.OnTou |
85 | 86 | |
86 | 87 | // the drag and drop operation has concluded |
87 | 88 | case DragEvent.ACTION_DRAG_ENDED: |
88 | - if (win_counter == 3) bravoPage(v); | |
89 | + if (win_counter == 3 && !done){done=true; bravoPage(v);} | |
89 | 90 | break; |
90 | 91 | |
91 | 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 | 15 | public class TutorialScene4Activity extends MyPlayActivity implements View.OnTouchListener, View.OnDragListener { |
16 | 16 | |
17 | 17 | private int win_counter = 0; |
18 | + private boolean done = false; | |
18 | 19 | |
19 | 20 | @Override |
20 | 21 | protected void onCreate(Bundle savedInstanceState) { |
... | ... | @@ -100,7 +101,10 @@ public class TutorialScene4Activity extends MyPlayActivity implements View.OnTou |
100 | 101 | |
101 | 102 | // the drag and drop operation has concluded |
102 | 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 | 108 | break; |
105 | 109 | |
106 | 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 | 12 | public class TutorialScene5Activity extends MyPlayActivity implements View.OnTouchListener { |
13 | 13 | |
14 | 14 | private int win_counter = 0; |
15 | + private boolean done = false; | |
15 | 16 | |
16 | 17 | @Override |
17 | 18 | protected void onCreate(Bundle savedInstanceState) { |
... | ... | @@ -56,7 +57,8 @@ public class TutorialScene5Activity extends MyPlayActivity implements View.OnTou |
56 | 57 | } else view.setBackgroundColor(0xff888888); |
57 | 58 | return true; |
58 | 59 | } |
59 | - if (win_counter == 4) { | |
60 | + if (win_counter == 4 && !done) { | |
61 | + done = true; | |
60 | 62 | this.bravoPage(null); |
61 | 63 | return true; |
62 | 64 | } else | ... | ... |