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.
*
* @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;

View File

@@ -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;

View File

@@ -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();

View File

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

View File

@@ -25,6 +25,13 @@
<item name="android:padding">6dp</item>
</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">
<item name="android:textSize">40sp</item>
<item name="android:textColor">#D3D3D3</item>