private void startTraining() { if (!foodItem.isFinishTraining()) { play = true; setPlayPauseIcon(true); mHandler.postDelayed(stepDelayRunnable, STEP_DISPLAY_TIME); countDownTimer.start(); } }
private void nextStep() { playNavigationSound(); foodItem.nextStep(); displayStepImage(); if (!foodItem.isFinishTraining()) { mHandler.postDelayed(stepDelayRunnable, STEP_DISPLAY_TIME); countDownTimer.start(); } }
private void resetTraining() { if (foodItem.isFinishTraining()) { foodItem.setFinishTraining(false); playPauseImageView.setVisibility(View.VISIBLE); } play = true; foodItem.setCurrentStep(1); displayStepImage(); startTraining(); }
private void previousStep() { if (!foodItem.previousStep()) { if (foodItem.isFinishTraining()) { foodItem.setFinishTraining(false); playPauseImageView.setVisibility(View.VISIBLE); } displayStepImage(); } else { finish(); } }
private void manualNextStep() { if (!foodItem.isFinishTraining()) { if (foodItem.isLastStep()) { playPauseImageView.setVisibility(View.INVISIBLE); timerTextView.setText(""); } else { playPauseImageView.setVisibility(View.VISIBLE); pauseTraining(); } foodItem.nextStep(); displayStepImage(); } else { starGetIdActivity(); } }