diff --git a/app/src/main/java/tonio/noa/TutorialScene3Activity.java b/app/src/main/java/tonio/noa/TutorialScene3Activity.java index 4ac58c1..d660a18 100644 --- a/app/src/main/java/tonio/noa/TutorialScene3Activity.java +++ b/app/src/main/java/tonio/noa/TutorialScene3Activity.java @@ -16,6 +16,7 @@ import android.widget.ImageView; public class TutorialScene3Activity extends MyPlayActivity implements View.OnTouchListener, View.OnDragListener { private int win_counter = 0; + private boolean done = false; @Override protected void onCreate(Bundle savedInstanceState) { @@ -85,7 +86,7 @@ public class TutorialScene3Activity extends MyPlayActivity implements View.OnTou // the drag and drop operation has concluded case DragEvent.ACTION_DRAG_ENDED: - if (win_counter == 3) bravoPage(v); + if (win_counter == 3 && !done){done=true; bravoPage(v);} break; //drag shadow has been released,the drag point is within the bounding box of the View diff --git a/app/src/main/java/tonio/noa/TutorialScene4Activity.java b/app/src/main/java/tonio/noa/TutorialScene4Activity.java index 9a2efdc..a407ba5 100644 --- a/app/src/main/java/tonio/noa/TutorialScene4Activity.java +++ b/app/src/main/java/tonio/noa/TutorialScene4Activity.java @@ -15,6 +15,7 @@ import android.view.View; public class TutorialScene4Activity extends MyPlayActivity implements View.OnTouchListener, View.OnDragListener { private int win_counter = 0; + private boolean done = false; @Override protected void onCreate(Bundle savedInstanceState) { @@ -100,7 +101,10 @@ public class TutorialScene4Activity extends MyPlayActivity implements View.OnTou // the drag and drop operation has concluded case DragEvent.ACTION_DRAG_ENDED: - if (win_counter == 12) bravoPage(v); + if (win_counter == 12 && !done) { + done = true; + bravoPage(v); + } break; //drag shadow has been released,the drag point is within the bounding box of the View diff --git a/app/src/main/java/tonio/noa/TutorialScene5Activity.java b/app/src/main/java/tonio/noa/TutorialScene5Activity.java index bbe03d6..744cb71 100644 --- a/app/src/main/java/tonio/noa/TutorialScene5Activity.java +++ b/app/src/main/java/tonio/noa/TutorialScene5Activity.java @@ -12,6 +12,7 @@ import android.view.View; public class TutorialScene5Activity extends MyPlayActivity implements View.OnTouchListener { private int win_counter = 0; + private boolean done = false; @Override protected void onCreate(Bundle savedInstanceState) { @@ -56,7 +57,8 @@ public class TutorialScene5Activity extends MyPlayActivity implements View.OnTou } else view.setBackgroundColor(0xff888888); return true; } - if (win_counter == 4) { + if (win_counter == 4 && !done) { + done = true; this.bravoPage(null); return true; } else -- libgit2 0.21.2