added auto complete after 10 reps

This commit is contained in:
Niels Gras
2024-06-07 14:28:20 +02:00
parent 798ba87e4d
commit f098710974

View File

@@ -5,6 +5,7 @@ import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator; import android.animation.ObjectAnimator;
import android.app.Dialog; import android.app.Dialog;
import android.content.Context; import android.content.Context;
import android.content.Intent;
import android.content.res.ColorStateList; import android.content.res.ColorStateList;
import android.graphics.Color; import android.graphics.Color;
import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.ColorDrawable;
@@ -184,6 +185,12 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
return false; return false;
}); });
if (EXERCISE_REP == 10) {
Intent intent = new Intent(FitnessActivity.this, EndScreenActivity.class);
startActivity(intent);
finish();
}
videoView.setOnCompletionListener(mp -> { videoView.setOnCompletionListener(mp -> {
if (EXERCISE_REP < EXERCISE_COUNT) { if (EXERCISE_REP < EXERCISE_COUNT) {
videoView.start(); // start the video again videoView.start(); // start the video again