Fixed description size

This commit is contained in:
SebasKoedam
2024-06-04 12:58:14 +02:00
parent c0aa0b46e9
commit 13b2b2f821
5 changed files with 23 additions and 15 deletions

View File

@@ -17,13 +17,14 @@ public class Exercise {
/** /**
* Constructor for the AbstractExercise class. * Constructor for the AbstractExercise class.
* *
* @param muscleGroup The muscle group of the exercise. * @param muscleGroup The muscle group of the exercise.
* @param leftPath The path of the left hand. * @param leftPath The path of the left hand.
* @param rightPath The path of the right hand. * @param rightPath The path of the right hand.
* @param name The title of the exercise. * @param name The title of the exercise.
* @param description The description of the exercise. * @param shortDescription The short description of the exercise.
* @param imageUrl The URL of the image. * @param description The full description of the exercise.
* @param videoUrl The URL of the video. * @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) { public Exercise(EMuscleGroup muscleGroup, String name,String shortDescription, String description, String imageUrl, String videoUrl, GesturePath leftPath, GesturePath rightPath, float exerciseTimeInSeconds) {
this.name = name; this.name = name;

View File

@@ -36,8 +36,7 @@ public class ExerciseManager {
private static final String[] REQUIRED_PROPERTIES = { private static final String[] REQUIRED_PROPERTIES = {
PROPERTY_MUSCLE_GROUP, PROPERTY_DESC,PROPERTY_SHORT_DESC, PROPERTY_IMAGE_URL, PROPERTY_MUSCLE_GROUP, PROPERTY_DESC,PROPERTY_SHORT_DESC, PROPERTY_IMAGE_URL,
PROPERTY_VIDEO_URL, PROPERTY_NAME, PROPERTY_PATH, PROPERTY_VIDEO_URL, PROPERTY_NAME, PROPERTY_PATH,
PROPERTY_EXERCISE_DURATION, PROPERTY_EXERCISE_ID, PROPERTY_EXERCISE_DURATION, PROPERTY_EXERCISE_ID
PROPERTY_SHORT_DESC
}; };
public static final int DEFAULT_EXERCISE_REPETITIONS = 10; public static final int DEFAULT_EXERCISE_REPETITIONS = 10;

View File

@@ -38,7 +38,7 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
private TextView exerciseMuscleGroupTextView; private TextView exerciseMuscleGroupTextView;
private TextView exerciseNameTextView; private TextView exerciseNameTextView;
private TextView exerciseShortDescriptionTextView; private TextView exerciseShortDescriptionTextView;
private TextView exerciseDescriptionTextView; //private TextView exerciseDescriptionTextView;
private static String exerciseVideoUrl; private static String exerciseVideoUrl;
private final Object lock = new Object(); private final Object lock = new Object();
@@ -65,8 +65,8 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
// Fill empty objects with exercise data // Fill empty objects with exercise data
this.exerciseNameTextView = findViewById(R.id.textViewFitnessTitle); this.exerciseNameTextView = findViewById(R.id.textViewFitnessTitle);
//this.exerciseDescriptionTextView = findViewById(R.id.textViewDialogDescription);
this.exerciseShortDescriptionTextView = findViewById(R.id.textViewFitnessShortDescription); this.exerciseShortDescriptionTextView = findViewById(R.id.textViewFitnessShortDescription);
//this.exerciseDescriptionTextView = findViewById(R.id.textViewDialogDescription);
// Navigation Buttons // Navigation Buttons
NavigationManager.setupButtonNavigation(this, R.id.homeButtonFitness, MainActivity.class); NavigationManager.setupButtonNavigation(this, R.id.homeButtonFitness, MainActivity.class);
@@ -117,9 +117,6 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
NavigationManager.navigateToActivity(this, EndScreenActivity.class); 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); exerciseShortDescriptionTextView.setText(exercise.shortDescription);
// exerciseDescriptionTextView.setText(exercise.description); // exerciseDescriptionTextView.setText(exercise.description);
exerciseVideoUrl = exercise.videoUrl; exerciseVideoUrl = exercise.videoUrl;
VideoView videoView = findViewById(R.id.videoView);
Log.e("exerciseVideoUrl", "videoUrl:" + exerciseVideoUrl);
playVideo(videoView, this);
}); });
} }
})).start(); })).start();

View File

@@ -88,7 +88,7 @@
<TextView <TextView
android:id="@+id/textViewFitnessShortDescription" android:id="@+id/textViewFitnessShortDescription"
style="@style/TextStyle" style="@style/TextStyleDesc"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:text="@string/context" android:text="@string/context"

View File

@@ -25,6 +25,13 @@
<item name="android:padding">6dp</item> <item name="android:padding">6dp</item>
</style> </style>
<style name="TextStyleDesc">
<item name="android:textSize">14sp</item>
<item name="android:textColor">#FFFFFF</item>
<item name= "android:textStyle">bold</item>
<item name="android:padding">6dp</item>
</style>
<style name="TextStyleTitle"> <style name="TextStyleTitle">
<item name="android:textSize">40sp</item> <item name="android:textSize">40sp</item>
<item name="android:textColor">#D3D3D3</item> <item name="android:textColor">#D3D3D3</item>