diff --git a/app/src/main/java/com/rubenvandeven/emotionhero/GamingActivity.java b/app/src/main/java/com/rubenvandeven/emotionhero/GamingActivity.java index fb8e709..10cf6c0 100644 --- a/app/src/main/java/com/rubenvandeven/emotionhero/GamingActivity.java +++ b/app/src/main/java/com/rubenvandeven/emotionhero/GamingActivity.java @@ -427,16 +427,14 @@ public class GamingActivity extends AppCompatActivity implements Detector.ImageL // scores.add(score); player.savePlayerInfo(playerInfo); - - finish(); GameOpenHelper gameHelper = new GameOpenHelper(getApplicationContext()); gameHelper.insertGame(currentScenario.game); - Log.d(LOG_TAG, "WHYYYY won't it work?!!! ;-)"); Intent intent = new Intent(this, ReviewActivity.class); intent.putExtra(ReviewActivity.INTENT_EXTRA_GAME_ID, currentScenario.game.id); intent.putExtra(ReviewActivity.INTENT_EXTRA_FROM_GAME, true); startActivity(intent); + finish(); } /** diff --git a/app/src/main/java/com/rubenvandeven/emotionhero/HighscoreActivity.java b/app/src/main/java/com/rubenvandeven/emotionhero/HighscoreActivity.java index cb64f98..afe9507 100644 --- a/app/src/main/java/com/rubenvandeven/emotionhero/HighscoreActivity.java +++ b/app/src/main/java/com/rubenvandeven/emotionhero/HighscoreActivity.java @@ -331,8 +331,8 @@ public class HighscoreActivity extends AppCompatActivity { getContext().getResources().getString(R.string.load_game_activity), true); Intent intent = new Intent(getContext(), GamingActivity.class); intent.putExtra(GamingActivity.INTENT_EXTRA_SCENARIO, scenario.id); - getActivity().finish(); startActivity(intent); + getActivity().finish(); } }); } else { diff --git a/app/src/main/java/com/rubenvandeven/emotionhero/IntroActivity.java b/app/src/main/java/com/rubenvandeven/emotionhero/IntroActivity.java index ee82ad0..4bd9a13 100644 --- a/app/src/main/java/com/rubenvandeven/emotionhero/IntroActivity.java +++ b/app/src/main/java/com/rubenvandeven/emotionhero/IntroActivity.java @@ -93,7 +93,6 @@ public class IntroActivity extends AppCompatActivity { public void continueToMenu() { continueHandler.removeCallbacks(continueRunnable); Intent intent = new Intent(this, MirrorMenuActivity.class); -// finish(); startActivity(intent); //disable distracting transition when going to menu IntroActivity.this.overridePendingTransition(0, 0); diff --git a/app/src/main/java/com/rubenvandeven/emotionhero/MirrorMenuActivity.java b/app/src/main/java/com/rubenvandeven/emotionhero/MirrorMenuActivity.java index 14d37bc..cb6de6b 100644 --- a/app/src/main/java/com/rubenvandeven/emotionhero/MirrorMenuActivity.java +++ b/app/src/main/java/com/rubenvandeven/emotionhero/MirrorMenuActivity.java @@ -246,9 +246,9 @@ public class MirrorMenuActivity extends AppCompatActivity implements Detector.Im @Override public void onClick(View v) { Intent intent = new Intent(MirrorMenuActivity.this, ProgressActivity.class); - finish(); startActivity(intent); stopDetector(); + finish(); } }); diff --git a/app/src/main/java/com/rubenvandeven/emotionhero/ProgressActivity.java b/app/src/main/java/com/rubenvandeven/emotionhero/ProgressActivity.java index a1cf1aa..5a27736 100644 --- a/app/src/main/java/com/rubenvandeven/emotionhero/ProgressActivity.java +++ b/app/src/main/java/com/rubenvandeven/emotionhero/ProgressActivity.java @@ -206,8 +206,8 @@ public class ProgressActivity extends AppCompatActivity { @Override public void onClick(View v) { Intent intent = new Intent(getApplicationContext(), EndingActivity.class); - finish(); startActivity(intent); + finish(); } }); } diff --git a/app/src/main/java/com/rubenvandeven/emotionhero/ReviewActivity.java b/app/src/main/java/com/rubenvandeven/emotionhero/ReviewActivity.java index fb659f7..86b80f0 100644 --- a/app/src/main/java/com/rubenvandeven/emotionhero/ReviewActivity.java +++ b/app/src/main/java/com/rubenvandeven/emotionhero/ReviewActivity.java @@ -209,8 +209,9 @@ public class ReviewActivity extends AppCompatActivity { intent.putExtra(GamingActivity.INTENT_EXTRA_SCENARIO, game.scenario.id); ProgressDialog dialog = ProgressDialog.show(ReviewActivity.this, "", getApplicationContext().getResources().getString(R.string.load_game_activity), true); - finish(); + startActivity(intent); + finish(); } }); @@ -231,8 +232,8 @@ public class ReviewActivity extends AppCompatActivity { @Override public void onClick(View v) { Intent intent = new Intent(getApplicationContext(), EndingActivity.class); - finish(); startActivity(intent); + finish(); } }); } else { @@ -243,8 +244,8 @@ public class ReviewActivity extends AppCompatActivity { intent.putExtra(GamingActivity.INTENT_EXTRA_SCENARIO, game.scenario.getNextLevelId()); ProgressDialog dialog = ProgressDialog.show(ReviewActivity.this, "", getApplicationContext().getResources().getString(R.string.load_game_activity), true); - finish(); startActivity(intent); + finish(); } }); } @@ -345,8 +346,8 @@ public class ReviewActivity extends AppCompatActivity { if(fromGame) { Intent intent = new Intent(getApplicationContext(), HighscoreActivity.class); intent.putExtra(HighscoreActivity.INTENT_EXTRA_GAME_ID, game.id); - finish(); startActivity(intent); + finish(); } else { onBackPressed(); }