added pepper animation using class

This commit is contained in:
Niels Gras
2024-06-05 14:50:50 +02:00
parent 2b631bd600
commit 68e688bb0e

View File

@@ -178,23 +178,7 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
ProgressBar loadingCircle = findViewById(R.id.loadingCircle);
loadingCircle.setVisibility(View.GONE);
if ( videoView.isPlaying() )
{
QiContext qiContext = null;
Animation animationarmraise = AnimationBuilder.with(qiContext) // Create the builder with the context.
.withResources(R.raw.armraise) // Set the animation resource.
.build(); // Build the animation.
animate = AnimateBuilder.with(qiContext) // Create the builder with the context.
.withAnimation(animationarmraise) // Set the animation.
.build(); // Build the animate action.
Future<Void> animateFuture = animate.async().run();
}
else
{
Log.e("FitnessActivity", "VideoView is null. Check your layout XML.");
}
Pepper.animate("armraise");
// Start checking for user movement once the video has loaded
this.motionProcessor.startCheckingUserMovement();