@Override protected void onResume() { super.onResume(); Log.d( Game.class.getName(), "Resume [creating, paused, finished, timerTime] " + creating + " " + paused + " " + finished + " " + timer.getElapsedTime()); if (!creating) { if (fieldCreationFragment.getZahlenschlange() == null) { createGame(); } else if (!paused && finished == GAME_FINISHED_NOT_YET) { startGame(); } else { updateGridView(); } } }
@Override protected void onStart() { super.onStart(); requestFullscreen(true, false, false, false); }
@Override protected void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); restoreElapsedTime(savedInstanceState); restoreGameState(savedInstanceState); restoreClickCount(savedInstanceState); }
@Override protected void onSaveInstanceState(Bundle outState) { hideLoadingDialog(); hideCenteredFullScreenDialog(); super.onSaveInstanceState(outState); saveElapsedTime(outState); saveGameState(outState); saveClickCount(outState); }
@Override protected void onRestart() { super.onRestart(); if (creating) { showLoadingDialog(); } else if (finished == GAME_FINISHED_NOT_YET) { pauseGame(); } }
@Override protected void onPause() { Log.d( Game.class.getName(), "Pause [creating, paused, finished, timerTime] " + creating + " " + paused + " " + finished + " " + timer.getElapsedTime()); super.onPause(); timer.stop(); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); paused = false; creating = false; finished = GAME_FINISHED_NOT_YET; noTitle(); lockScreenshots(); setContentView(R.layout.activity_game); fetchGUIElements(); fetchExtras(); fetchFieldCreationFragment(); setTimer(new Timer(101)); setGridToSize(difficulty); setTimerTime(0); setClickCount(0); }
@Override public void finish() { updateResult(); super.finish(); }
@Override protected void onDestroy() { super.onDestroy(); }
@Override protected void onStop() { super.onStop(); }