From 13b2b2f8210e7154fca61c4a1ecdbf703a0844de Mon Sep 17 00:00:00 2001 From: SebasKoedam Date: Tue, 4 Jun 2024 12:58:14 +0200 Subject: [PATCH] Fixed description size --- .../com/example/fitbot/exercise/Exercise.java | 15 ++++++++------- .../example/fitbot/exercise/ExerciseManager.java | 3 +-- .../fitbot/ui/activities/FitnessActivity.java | 11 ++++++----- .../app/src/main/res/layout/activity_fitness.xml | 2 +- .../src/Fitbot/app/src/main/res/values/styles.xml | 7 +++++++ 5 files changed, 23 insertions(+), 15 deletions(-) diff --git a/code/src/Fitbot/app/src/main/java/com/example/fitbot/exercise/Exercise.java b/code/src/Fitbot/app/src/main/java/com/example/fitbot/exercise/Exercise.java index d0c4dc9..18153d7 100644 --- a/code/src/Fitbot/app/src/main/java/com/example/fitbot/exercise/Exercise.java +++ b/code/src/Fitbot/app/src/main/java/com/example/fitbot/exercise/Exercise.java @@ -17,13 +17,14 @@ public class Exercise { /** * Constructor for the AbstractExercise class. * - * @param muscleGroup The muscle group of the exercise. - * @param leftPath The path of the left hand. - * @param rightPath The path of the right hand. - * @param name The title of the exercise. - * @param description The description of the exercise. - * @param imageUrl The URL of the image. - * @param videoUrl The URL of the video. + * @param muscleGroup The muscle group of the exercise. + * @param leftPath The path of the left hand. + * @param rightPath The path of the right hand. + * @param name The title of the exercise. + * @param shortDescription The short description of the exercise. + * @param description The full description of the exercise. + * @param imageUrl The URL of the image. + * @param videoUrl The URL of the video. */ public Exercise(EMuscleGroup muscleGroup, String name,String shortDescription, String description, String imageUrl, String videoUrl, GesturePath leftPath, GesturePath rightPath, float exerciseTimeInSeconds) { this.name = name; diff --git a/code/src/Fitbot/app/src/main/java/com/example/fitbot/exercise/ExerciseManager.java b/code/src/Fitbot/app/src/main/java/com/example/fitbot/exercise/ExerciseManager.java index 94599a9..f58a6fa 100644 --- a/code/src/Fitbot/app/src/main/java/com/example/fitbot/exercise/ExerciseManager.java +++ b/code/src/Fitbot/app/src/main/java/com/example/fitbot/exercise/ExerciseManager.java @@ -36,8 +36,7 @@ public class ExerciseManager { private static final String[] REQUIRED_PROPERTIES = { PROPERTY_MUSCLE_GROUP, PROPERTY_DESC,PROPERTY_SHORT_DESC, PROPERTY_IMAGE_URL, PROPERTY_VIDEO_URL, PROPERTY_NAME, PROPERTY_PATH, - PROPERTY_EXERCISE_DURATION, PROPERTY_EXERCISE_ID, - PROPERTY_SHORT_DESC + PROPERTY_EXERCISE_DURATION, PROPERTY_EXERCISE_ID }; public static final int DEFAULT_EXERCISE_REPETITIONS = 10; diff --git a/code/src/Fitbot/app/src/main/java/com/example/fitbot/ui/activities/FitnessActivity.java b/code/src/Fitbot/app/src/main/java/com/example/fitbot/ui/activities/FitnessActivity.java index 975a8b3..a29fc5c 100644 --- a/code/src/Fitbot/app/src/main/java/com/example/fitbot/ui/activities/FitnessActivity.java +++ b/code/src/Fitbot/app/src/main/java/com/example/fitbot/ui/activities/FitnessActivity.java @@ -38,7 +38,7 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall private TextView exerciseMuscleGroupTextView; private TextView exerciseNameTextView; private TextView exerciseShortDescriptionTextView; - private TextView exerciseDescriptionTextView; + //private TextView exerciseDescriptionTextView; private static String exerciseVideoUrl; private final Object lock = new Object(); @@ -65,8 +65,8 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall // Fill empty objects with exercise data this.exerciseNameTextView = findViewById(R.id.textViewFitnessTitle); - //this.exerciseDescriptionTextView = findViewById(R.id.textViewDialogDescription); this.exerciseShortDescriptionTextView = findViewById(R.id.textViewFitnessShortDescription); + //this.exerciseDescriptionTextView = findViewById(R.id.textViewDialogDescription); // Navigation Buttons NavigationManager.setupButtonNavigation(this, R.id.homeButtonFitness, MainActivity.class); @@ -117,9 +117,6 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall NavigationManager.navigateToActivity(this, EndScreenActivity.class); }); }); - VideoView videoView = findViewById(R.id.videoView); - Log.e("exerciseVideoUrl", "videoUrl:" + exerciseVideoUrl); - playVideo(videoView, this); } /** @@ -141,6 +138,10 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall exerciseShortDescriptionTextView.setText(exercise.shortDescription); // exerciseDescriptionTextView.setText(exercise.description); exerciseVideoUrl = exercise.videoUrl; + + VideoView videoView = findViewById(R.id.videoView); + Log.e("exerciseVideoUrl", "videoUrl:" + exerciseVideoUrl); + playVideo(videoView, this); }); } })).start(); diff --git a/code/src/Fitbot/app/src/main/res/layout/activity_fitness.xml b/code/src/Fitbot/app/src/main/res/layout/activity_fitness.xml index ea324d5..fb8f702 100644 --- a/code/src/Fitbot/app/src/main/res/layout/activity_fitness.xml +++ b/code/src/Fitbot/app/src/main/res/layout/activity_fitness.xml @@ -88,7 +88,7 @@ 6dp + +