Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-4/muupooviixee66
This commit is contained in:
84
.idea/workspace.xml
generated
84
.idea/workspace.xml
generated
@@ -15,8 +15,9 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="00599d5b-7eb5-44da-ad7f-98bf42384c16" name="Changes" comment="Final update onderzoek-formulier.md">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/personalDocs/Luca/literatuuronderzoek/onderzoek-formulier.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/personalDocs/Luca/literatuuronderzoek/onderzoek-formulier.md" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/docs/personalDocs/Luca/weekly-reports/sprint-1-week-1.md" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/docs/personalDocs/Luca/weekly-reports/sprint-1-week-2.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/code/src/Fitbot/app/src/main/java/com/example/fitbot/MainActivity.java" beforeDir="false" afterPath="$PROJECT_DIR$/code/src/Fitbot/app/src/main/java/com/example/fitbot/MainActivity.java" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@@ -26,6 +27,7 @@
|
||||
<component name="ClangdSettings">
|
||||
<option name="formatViaClangd" value="false" />
|
||||
</component>
|
||||
<component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[]" />
|
||||
<component name="ExternalProjectsData">
|
||||
<projectState path="$PROJECT_DIR$">
|
||||
<ProjectState />
|
||||
@@ -65,9 +67,13 @@
|
||||
<filtered-out-file-type name="COMMIT_BY_MESSAGE" />
|
||||
</file-type-list>
|
||||
</component>
|
||||
<component name="ProjectColorInfo">{
|
||||
"associatedIndex": 7
|
||||
}</component>
|
||||
<component name="MarkdownSettingsMigration">
|
||||
<option name="stateVersion" value="1" />
|
||||
</component>
|
||||
<component name="ProjectColorInfo"><![CDATA[{
|
||||
"customColor": "",
|
||||
"associatedIndex": 7
|
||||
}]]></component>
|
||||
<component name="ProjectId" id="2fE3N2CwEPDo9wBtexBLxU20tCJ" />
|
||||
<component name="ProjectLevelVcsManager">
|
||||
<ConfirmationsSetting value="2" id="Add" />
|
||||
@@ -76,18 +82,19 @@
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"git-widget-placeholder": "main",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"git-widget-placeholder": "Merging main",
|
||||
"kotlin-language-version-configured": "true",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}</component>
|
||||
}]]></component>
|
||||
<component name="RecentsManager">
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="$PROJECT_DIR$/code/src/app/src/main/java/com/fitbot" />
|
||||
@@ -102,40 +109,19 @@
|
||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
||||
<option name="ALL_USERS" value="false" />
|
||||
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
|
||||
<option name="CLEAR_APP_STORAGE" value="false" />
|
||||
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="" />
|
||||
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||
<option name="MODE" value="default_activity" />
|
||||
<option name="CLEAR_LOGCAT" value="false" />
|
||||
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="false" />
|
||||
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
|
||||
<option name="FORCE_STOP_RUNNING_APP" value="true" />
|
||||
<option name="INSPECTION_WITHOUT_ACTIVITY_RESTART" value="false" />
|
||||
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
|
||||
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
|
||||
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
|
||||
<option name="DEBUGGER_TYPE" value="Auto" />
|
||||
<Auto>
|
||||
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||
<option name="SHOW_STATIC_VARS" value="true" />
|
||||
<option name="WORKING_DIR" value="" />
|
||||
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||
</Auto>
|
||||
<Hybrid>
|
||||
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||
<option name="SHOW_STATIC_VARS" value="true" />
|
||||
<option name="WORKING_DIR" value="" />
|
||||
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||
</Hybrid>
|
||||
<Java />
|
||||
<Native>
|
||||
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||
<option name="SHOW_STATIC_VARS" value="true" />
|
||||
<option name="WORKING_DIR" value="" />
|
||||
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||
</Native>
|
||||
<option name="DEBUGGER_TYPE" value="Java" />
|
||||
<Java>
|
||||
<option name="ATTACH_ON_WAIT_FOR_DEBUGGER" value="false" />
|
||||
<option name="DEBUG_SANDBOX_SDK" value="false" />
|
||||
</Java>
|
||||
<Profilers>
|
||||
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
|
||||
<option name="STARTUP_PROFILING_ENABLED" value="false" />
|
||||
@@ -148,18 +134,9 @@
|
||||
<option name="ACTIVITY_CLASS" value="" />
|
||||
<option name="SEARCH_ACTIVITY_IN_GLOBAL_SCOPE" value="false" />
|
||||
<option name="SKIP_ACTIVITY_VALIDATION" value="false" />
|
||||
<method v="2">
|
||||
<option name="Android.Gradle.BeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
<component name="SharedIndexes">
|
||||
<attachedChunks>
|
||||
<set>
|
||||
<option value="bundled-js-predefined-1d06a55b98c1-2e7d6887c066-JavaScript-WS-241.15989.47" />
|
||||
</set>
|
||||
</attachedChunks>
|
||||
</component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
@@ -172,6 +149,7 @@
|
||||
<workItem from="1713352446871" duration="1766000" />
|
||||
<workItem from="1713814327036" duration="4920000" />
|
||||
<workItem from="1713863377053" duration="634000" />
|
||||
<workItem from="1713960463274" duration="353000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="Changes">
|
||||
<created>1713528225837</created>
|
||||
|
@@ -32,6 +32,7 @@ dependencies {
|
||||
|
||||
implementation 'com.android.support:appcompat-v7:28.0.0'
|
||||
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
|
||||
implementation 'com.android.support:cardview-v7:28.0.0'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
||||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.fitbot">
|
||||
package="com.example.fitbot" >
|
||||
|
||||
<uses-feature android:name="com.softbank.hardware.pepper" />
|
||||
|
||||
@@ -10,16 +10,28 @@
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.Fitbot">
|
||||
android:theme="@style/Theme.Fitbot" >
|
||||
<activity
|
||||
android:name=".bicepvideo"
|
||||
android:name=".Completion_Screen"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".ui.SportMenuActivity"
|
||||
android:exported="true" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".BicepVideo"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".MainScreen"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true">
|
||||
android:exported="true" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
|
@@ -0,0 +1,59 @@
|
||||
package com.example.fitbot;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.widget.Button;
|
||||
import android.widget.MediaController;
|
||||
import android.widget.VideoView;
|
||||
|
||||
import com.aldebaran.qi.sdk.QiContext;
|
||||
import com.aldebaran.qi.sdk.builder.AnimateBuilder;
|
||||
import com.aldebaran.qi.sdk.builder.AnimationBuilder;
|
||||
import com.aldebaran.qi.sdk.object.actuation.Animate;
|
||||
import com.aldebaran.qi.sdk.object.actuation.Animation;
|
||||
|
||||
public class BicepVideo extends AppCompatActivity {
|
||||
|
||||
// private QiContext qiContext;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_bicepvideo);
|
||||
setupButtons();
|
||||
}
|
||||
|
||||
public void Video(QiContext qiContext) {
|
||||
VideoView videoView = findViewById(R.id.videoView);
|
||||
videoView.setVideoURI(Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.bicepvideo));
|
||||
|
||||
MediaController mediaController = new MediaController(this);
|
||||
videoView.setMediaController(mediaController);
|
||||
videoView.setOnCompletionListener(mp -> videoView.start());
|
||||
videoView.start();
|
||||
|
||||
Animation animation = AnimationBuilder.with(qiContext)
|
||||
.withResources(R.raw.bicepcurl)
|
||||
.build();
|
||||
|
||||
Animate animate = AnimateBuilder.with(qiContext)
|
||||
.withAnimation(animation)
|
||||
.build();
|
||||
|
||||
|
||||
animate.async().run();
|
||||
|
||||
}
|
||||
private void setupButtons() {
|
||||
Button backButton = findViewById(R.id.buttonback);
|
||||
backButton.setOnClickListener(v -> finish());
|
||||
|
||||
Button completeButton = findViewById(R.id.buttoncomplete);
|
||||
completeButton.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(BicepVideo.this, Completion_Screen.class);
|
||||
startActivity(intent);
|
||||
});
|
||||
}
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
package com.example.fitbot;
|
||||
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
|
||||
public class Completion_Screen extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_completion_screen);
|
||||
}
|
||||
}
|
@@ -1,15 +1,19 @@
|
||||
package com.example.fitbot;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.aldebaran.qi.sdk.QiContext;
|
||||
import com.aldebaran.qi.sdk.QiSDK;
|
||||
import com.aldebaran.qi.sdk.RobotLifecycleCallbacks;
|
||||
import com.aldebaran.qi.sdk.builder.AnimateBuilder;
|
||||
import com.aldebaran.qi.sdk.builder.AnimationBuilder;
|
||||
import com.aldebaran.qi.sdk.builder.SayBuilder;
|
||||
import com.aldebaran.qi.sdk.design.activity.RobotActivity;
|
||||
import com.aldebaran.qi.sdk.design.activity.conversationstatus.SpeechBarDisplayStrategy;
|
||||
import com.aldebaran.qi.sdk.object.conversation.Phrase;
|
||||
import com.aldebaran.qi.sdk.object.actuation.Animate;
|
||||
import com.aldebaran.qi.sdk.object.actuation.Animation;
|
||||
import com.aldebaran.qi.sdk.object.conversation.Phrase;
|
||||
import com.aldebaran.qi.sdk.object.conversation.Say;
|
||||
import com.aldebaran.qi.sdk.object.locale.Language;
|
||||
@@ -35,23 +39,42 @@ public class MainActivity extends RobotActivity implements RobotLifecycleCallbac
|
||||
|
||||
@Override
|
||||
public void onRobotFocusGained(QiContext qiContext) {
|
||||
String locationName = ("de Hogeschool van Amsterdam");
|
||||
String locationDescription = ("de Hogeschool van Amsterdam");
|
||||
Locale locale = new Locale(Language.DUTCH, Region.NETHERLANDS);
|
||||
|
||||
Phrase namePhrase = new Phrase("This location is " + locationName);
|
||||
// Create a new say action.
|
||||
Say say = SayBuilder.with(qiContext) // Create the builder with the context.
|
||||
.withText("Hallo hoe gaat het?") // Set the text to say.
|
||||
.build(); // Build the say action.
|
||||
|
||||
String locationName = ("de hogeschool van amsterdam");
|
||||
String locationDescription = ("0 bitches");
|
||||
|
||||
Phrase namePhrase = new Phrase("Deze locatie is " + locationName);
|
||||
Say sayName = SayBuilder.with(qiContext)
|
||||
.withPhrase(namePhrase)
|
||||
.withLocale(locale)
|
||||
.build();
|
||||
|
||||
Phrase descriptionPhrase = new Phrase(locationDescription);
|
||||
Phrase descriptionPhrase = new Phrase(locationDescription);
|
||||
Say sayDescription = SayBuilder.with(qiContext)
|
||||
.withPhrase(descriptionPhrase)
|
||||
.withLocale(locale)
|
||||
.build();
|
||||
|
||||
sayName.run();
|
||||
sayDescription.run();
|
||||
|
||||
// Create a new BicepVideo with the qiContext
|
||||
// BicepVideo BicepVideo = new BicepVideo();
|
||||
//
|
||||
// // Call the videoPlayer method
|
||||
// BicepVideo.Video(qiContext);
|
||||
|
||||
// Execute the action.
|
||||
say.run();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onRobotFocusLost() {
|
||||
// Nothing here.
|
||||
|
@@ -5,19 +5,17 @@ import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.widget.Button;
|
||||
|
||||
import com.example.fitbot.bicepvideo;
|
||||
|
||||
public class MainScreen extends AppCompatActivity {
|
||||
Button button;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
setContentView(R.layout.activity_main_screen);
|
||||
|
||||
button = findViewById(R.id.open_video);
|
||||
button = findViewById(R.id.open_BicepVideo);
|
||||
button.setOnClickListener(v -> {
|
||||
Intent i = new Intent(MainScreen.this, bicepvideo.class);
|
||||
Intent i = new Intent(MainScreen.this, BicepVideo.class);
|
||||
startActivity(i);
|
||||
});
|
||||
}
|
||||
|
@@ -1,42 +0,0 @@
|
||||
package com.example.fitbot;
|
||||
|
||||
import android.media.MediaPlayer;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.MediaController;
|
||||
import android.widget.VideoView;
|
||||
|
||||
public class bicepvideo extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_bicepvideo);
|
||||
|
||||
VideoView videoView = findViewById(R.id.videoView);
|
||||
videoView.setVideoURI(Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.bicepvideo));
|
||||
|
||||
Button backButton = findViewById(R.id.buttonback);
|
||||
backButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// Finish the current activity (VideoViewHere)
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
MediaController mediaController = new MediaController(this);
|
||||
videoView.setMediaController(mediaController);
|
||||
videoView.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
|
||||
@Override
|
||||
public void onCompletion(MediaPlayer mp) {
|
||||
videoView.start(); // Restart video on completion
|
||||
}
|
||||
});
|
||||
|
||||
videoView.start();
|
||||
}
|
||||
}
|
@@ -0,0 +1,35 @@
|
||||
package com.example.fitbot.speech;
|
||||
|
||||
import com.aldebaran.qi.sdk.QiContext;
|
||||
import com.aldebaran.qi.sdk.builder.SayBuilder;
|
||||
import com.aldebaran.qi.sdk.object.locale.Language;
|
||||
import com.aldebaran.qi.sdk.object.locale.Locale;
|
||||
import com.aldebaran.qi.sdk.object.locale.Region;
|
||||
|
||||
public class SpeechGenerator {
|
||||
|
||||
private static final Locale DUTCH_LOCALE = new Locale(Language.DUTCH, Region.NETHERLANDS);
|
||||
private SayBuilder builder;
|
||||
|
||||
/**
|
||||
* Function for making the robot say something with DUTCH_LOCALE as locale
|
||||
* @param phrase The phrase to make the robot say
|
||||
* @param ctx The QiContext to use
|
||||
*/
|
||||
public static void say(String phrase, QiContext ctx)
|
||||
{
|
||||
say(phrase, ctx, DUTCH_LOCALE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void say(String text, QiContext ctx, Locale locale)
|
||||
{
|
||||
SayBuilder.with(ctx)
|
||||
.withLocale(locale)
|
||||
.withText(text)
|
||||
.build()
|
||||
.run();
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
package com.example.fitbot.sports;
|
||||
|
||||
public enum ESportType {
|
||||
|
||||
FITNESS("Fitness"),
|
||||
POWER("Krachttrening");
|
||||
|
||||
private final String name;
|
||||
|
||||
ESportType(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,21 @@
|
||||
package com.example.fitbot.ui;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
import com.example.fitbot.R;
|
||||
|
||||
public class SportItemActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_sport_item);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
package com.example.fitbot.ui;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
import com.example.fitbot.R;
|
||||
|
||||
|
||||
public class SportMenuActivity extends AppCompatActivity {
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_sport_menu);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
}
|
||||
}
|
@@ -0,0 +1,45 @@
|
||||
package com.example.fitbot.ui;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Rect;
|
||||
import android.view.View;
|
||||
|
||||
import com.example.fitbot.sports.ESportType;
|
||||
|
||||
public class SportMenuItem extends View {
|
||||
|
||||
private Paint backgroundPaint, textPaint;
|
||||
private String title, description;
|
||||
private Bitmap imageResource;
|
||||
private Rect imageRect, elementRect;
|
||||
private ESportType type;
|
||||
|
||||
public SportMenuItem(Context context, ESportType type, String title, String description, Bitmap backgroundImage) {
|
||||
super(context);
|
||||
this.title = title;
|
||||
this.description = description;
|
||||
this.imageResource = backgroundImage;
|
||||
this.imageRect = new Rect(0, 0, this.imageResource.getWidth(), this.imageResource.getHeight());
|
||||
this.elementRect = new Rect(0, 0, this.getWidth(), this.getHeight());
|
||||
this.type = type;
|
||||
this.backgroundPaint = new Paint();
|
||||
this.textPaint = new Paint();
|
||||
this.textPaint.setTextAlign(Paint.Align.CENTER);
|
||||
this.backgroundPaint.setColor(0xFFF0F0F0);
|
||||
this.textPaint.setColor(0xFF000000);
|
||||
|
||||
this.setOnClickListener(v -> context.startActivity(new Intent(context, SportItemActivity.class)));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
super.onDraw(canvas);
|
||||
canvas.drawBitmap(this.imageResource, this.imageRect, this.elementRect, null);
|
||||
canvas.drawRoundRect(0, 0, getWidth(), getHeight(), 10, 10, backgroundPaint);
|
||||
canvas.drawText(title, getWidth() / 2.0f, this.textPaint.getFontMetrics().top, textPaint);
|
||||
}
|
||||
}
|
@@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".bicepvideo">
|
||||
tools:context=".BicepVideo">
|
||||
|
||||
<VideoView
|
||||
android:id="@+id/videoView"
|
||||
android:layout_width="1136dp"
|
||||
android:layout_height="458dp"
|
||||
android:layout_width="1142dp"
|
||||
android:layout_height="515dp"
|
||||
android:layout_marginTop="64dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -48,11 +48,11 @@
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginEnd="122dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="Hier ziet u een voorbeeld van een dumbell curl. Pak het gewenste gewicht een flesje water werkt ook. Houd de dumbell met uw palm naarboven gericht vast Krul het gewicht langzaam omhoog door uw elleboog te buigen en uw elleboog dicht bij uw lichaam te houden. Laat het gewicht vervolgens langzaam zakken naar de startpositie "
|
||||
android:text="Uitleg text"
|
||||
android:textSize="32sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/videoView" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</android.support.constraint.ConstraintLayout>
|
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Completion_Screen">
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
@@ -15,4 +15,13 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/menu_switch_btn"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="50dp"
|
||||
android:text="Go to Sport Menu"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
/>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
@@ -7,14 +7,14 @@
|
||||
tools:context=".MainScreen">
|
||||
|
||||
<Button
|
||||
android:id="@+id/open_video"
|
||||
android:id="@+id/open_BicepVideo"
|
||||
android:layout_width="215dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginStart="108dp"
|
||||
android:layout_marginTop="341dp"
|
||||
android:layout_marginEnd="108dp"
|
||||
android:layout_marginBottom="342dp"
|
||||
android:text="oefeningvideo1"
|
||||
android:text="Bicep Oefening"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:context=".ui.SportMenuActivity">
|
||||
|
||||
<com.example.fitbot.ui.SportMenuItem
|
||||
android:id="@+id/sportMenuItem1"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="300dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
244
code/src/Fitbot/app/src/main/res/raw/bicepcurl.qianim
Normal file
244
code/src/Fitbot/app/src/main/res/raw/bicepcurl.qianim
Normal file
@@ -0,0 +1,244 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Animation xmlns:editor="http://www.ald.softbankrobotics.com/animation/editor" typeVersion="2.0" editor:fps="25">
|
||||
<editor:clip editor:fps="25" editor:startFrame="16" editor:endFrame="2147483647"/>
|
||||
<ActuatorCurve fps="25" actuator="LShoulderPitch" mute="false" unit="degree">
|
||||
<Key value="90.5273514" frame="0">
|
||||
<Tangent side="right" abscissaParam="13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="90.5273514" frame="40">
|
||||
<Tangent side="left" abscissaParam="-13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="90.5273514" frame="73">
|
||||
<Tangent side="left" abscissaParam="-11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="90.5273514" frame="116">
|
||||
<Tangent side="left" abscissaParam="-14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="90.5273514" frame="154">
|
||||
<Tangent side="left" abscissaParam="-12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LShoulderRoll" mute="false" unit="degree">
|
||||
<Key value="6.67969275" frame="0">
|
||||
<Tangent side="right" abscissaParam="13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="6.67969275" frame="40">
|
||||
<Tangent side="left" abscissaParam="-13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="6.67969275" frame="73">
|
||||
<Tangent side="left" abscissaParam="-11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="6.67969275" frame="116">
|
||||
<Tangent side="left" abscissaParam="-14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="6.67969275" frame="154">
|
||||
<Tangent side="left" abscissaParam="-12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LElbowYaw" mute="false" unit="degree">
|
||||
<Key value="-95.2559814" frame="0">
|
||||
<Tangent side="right" abscissaParam="13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-95.2559814" frame="40">
|
||||
<Tangent side="left" abscissaParam="-13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-95.2559814" frame="73">
|
||||
<Tangent side="left" abscissaParam="-11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-95.2559814" frame="116">
|
||||
<Tangent side="left" abscissaParam="-14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-95.2559814" frame="154">
|
||||
<Tangent side="left" abscissaParam="-12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LElbowRoll" mute="false" unit="degree">
|
||||
<Key value="-29.7070332" frame="0">
|
||||
<Tangent side="right" abscissaParam="13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-29.7070332" frame="40">
|
||||
<Tangent side="left" abscissaParam="-13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-29.7070332" frame="73">
|
||||
<Tangent side="left" abscissaParam="-11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-89.5" frame="116">
|
||||
<Tangent side="left" abscissaParam="-14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-29.7070332" frame="154">
|
||||
<Tangent side="left" abscissaParam="-12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LWristYaw" mute="false" unit="degree">
|
||||
<Key value="-89.5501938" frame="0">
|
||||
<Tangent side="right" abscissaParam="13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-89.5501938" frame="40">
|
||||
<Tangent side="left" abscissaParam="-13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-89.5501938" frame="73">
|
||||
<Tangent side="left" abscissaParam="-11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-89.5501938" frame="116">
|
||||
<Tangent side="left" abscissaParam="-14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-89.5501938" frame="154">
|
||||
<Tangent side="left" abscissaParam="-12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LHand" mute="false" unit="dimensionless">
|
||||
<Key value="0.589630966" frame="0">
|
||||
<Tangent side="right" abscissaParam="13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.589630966" frame="40">
|
||||
<Tangent side="left" abscissaParam="-13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.589630966" frame="73">
|
||||
<Tangent side="left" abscissaParam="-11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.589630966" frame="116">
|
||||
<Tangent side="left" abscissaParam="-14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.589630966" frame="154">
|
||||
<Tangent side="left" abscissaParam="-12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RShoulderPitch" mute="false" unit="degree">
|
||||
<Key value="90.5273438" frame="0">
|
||||
<Tangent side="right" abscissaParam="13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="90.5273438" frame="40">
|
||||
<Tangent side="left" abscissaParam="-13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="90.5273438" frame="73">
|
||||
<Tangent side="left" abscissaParam="-11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="90.5273438" frame="116">
|
||||
<Tangent side="left" abscissaParam="-14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="90.5273438" frame="154">
|
||||
<Tangent side="left" abscissaParam="-12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RShoulderRoll" mute="false" unit="degree">
|
||||
<Key value="-6.59180212" frame="0">
|
||||
<Tangent side="right" abscissaParam="13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-6.59180212" frame="40">
|
||||
<Tangent side="left" abscissaParam="-13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-6.59180212" frame="73">
|
||||
<Tangent side="left" abscissaParam="-11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-6.59180212" frame="116">
|
||||
<Tangent side="left" abscissaParam="-14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-6.59180212" frame="154">
|
||||
<Tangent side="left" abscissaParam="-12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RElbowYaw" mute="false" unit="degree">
|
||||
<Key value="86.3469238" frame="0">
|
||||
<Tangent side="right" abscissaParam="13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="86.3469238" frame="40">
|
||||
<Tangent side="left" abscissaParam="-13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="86.3469238" frame="73">
|
||||
<Tangent side="left" abscissaParam="-11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="86.3469238" frame="116">
|
||||
<Tangent side="left" abscissaParam="-14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="86.3469238" frame="154">
|
||||
<Tangent side="left" abscissaParam="-12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RElbowRoll" mute="false" unit="degree">
|
||||
<Key value="29.7070332" frame="0">
|
||||
<Tangent side="right" abscissaParam="13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="89.5" frame="40">
|
||||
<Tangent side="left" abscissaParam="-13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="29.7070332" frame="73">
|
||||
<Tangent side="left" abscissaParam="-11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="29.7070332" frame="116">
|
||||
<Tangent side="left" abscissaParam="-14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="29.7070332" frame="154">
|
||||
<Tangent side="left" abscissaParam="-12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RWristYaw" mute="false" unit="degree">
|
||||
<Key value="79.2472229" frame="0">
|
||||
<Tangent side="right" abscissaParam="13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="79.2472229" frame="40">
|
||||
<Tangent side="left" abscissaParam="-13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="79.2472229" frame="73">
|
||||
<Tangent side="left" abscissaParam="-11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="79.2472229" frame="116">
|
||||
<Tangent side="left" abscissaParam="-14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="79.2472229" frame="154">
|
||||
<Tangent side="left" abscissaParam="-12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RHand" mute="false" unit="dimensionless">
|
||||
<Key value="0.588752136" frame="0">
|
||||
<Tangent side="right" abscissaParam="13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.588752136" frame="40">
|
||||
<Tangent side="left" abscissaParam="-13.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.588752136" frame="73">
|
||||
<Tangent side="left" abscissaParam="-11" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.588752136" frame="116">
|
||||
<Tangent side="left" abscissaParam="-14.3333333" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.588752136" frame="154">
|
||||
<Tangent side="left" abscissaParam="-12.6666667" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
</Animation>
|
148
code/src/Fitbot/app/src/main/res/raw/lateralraises.qianim
Normal file
148
code/src/Fitbot/app/src/main/res/raw/lateralraises.qianim
Normal file
@@ -0,0 +1,148 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Animation xmlns:editor="http://www.ald.softbankrobotics.com/animation/editor" typeVersion="2.0" editor:fps="25">
|
||||
<editor:clip editor:fps="25" editor:startFrame="24" editor:endFrame="79"/>
|
||||
<ActuatorCurve fps="25" actuator="LShoulderPitch" mute="false" unit="degree">
|
||||
<Key value="90.5273514" frame="7">
|
||||
<Tangent side="right" abscissaParam="1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="90.5273514" frame="10">
|
||||
<Tangent side="left" abscissaParam="-1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="90.5273514" frame="70">
|
||||
<Tangent side="left" abscissaParam="-20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LShoulderRoll" mute="false" unit="degree">
|
||||
<Key value="89.5" frame="7">
|
||||
<Tangent side="right" abscissaParam="1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="6.67969275" frame="10">
|
||||
<Tangent side="left" abscissaParam="-1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="89.5" frame="70">
|
||||
<Tangent side="left" abscissaParam="-20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LElbowYaw" mute="false" unit="degree">
|
||||
<Key value="-69.7851486" frame="7">
|
||||
<Tangent side="right" abscissaParam="1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-69.7851486" frame="10">
|
||||
<Tangent side="left" abscissaParam="-1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-69.7851486" frame="70">
|
||||
<Tangent side="left" abscissaParam="-20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LElbowRoll" mute="false" unit="degree">
|
||||
<Key value="-29.7070332" frame="7">
|
||||
<Tangent side="right" abscissaParam="1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-29.7070332" frame="10">
|
||||
<Tangent side="left" abscissaParam="-1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-29.7070332" frame="70">
|
||||
<Tangent side="left" abscissaParam="-20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LWristYaw" mute="false" unit="degree">
|
||||
<Key value="-1.76023543" frame="7">
|
||||
<Tangent side="right" abscissaParam="1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-1.76023543" frame="10">
|
||||
<Tangent side="left" abscissaParam="-1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-1.76023543" frame="70">
|
||||
<Tangent side="left" abscissaParam="-20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="LHand" mute="false" unit="dimensionless">
|
||||
<Key value="0.589630966" frame="7">
|
||||
<Tangent side="right" abscissaParam="1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.589630966" frame="10">
|
||||
<Tangent side="left" abscissaParam="-1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.589630966" frame="70">
|
||||
<Tangent side="left" abscissaParam="-20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RShoulderPitch" mute="false" unit="degree">
|
||||
<Key value="90.5273438" frame="7">
|
||||
<Tangent side="right" abscissaParam="1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="90.5273438" frame="10">
|
||||
<Tangent side="left" abscissaParam="-1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="90.5273438" frame="70">
|
||||
<Tangent side="left" abscissaParam="-20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RShoulderRoll" mute="false" unit="degree">
|
||||
<Key value="-89.5" frame="7">
|
||||
<Tangent side="right" abscissaParam="1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-6.59180212" frame="10">
|
||||
<Tangent side="left" abscissaParam="-1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="-89.5" frame="70">
|
||||
<Tangent side="left" abscissaParam="-20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RElbowYaw" mute="false" unit="degree">
|
||||
<Key value="70.2246094" frame="7">
|
||||
<Tangent side="right" abscissaParam="1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="70.2246094" frame="10">
|
||||
<Tangent side="left" abscissaParam="-1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="70.2246094" frame="70">
|
||||
<Tangent side="left" abscissaParam="-20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RElbowRoll" mute="false" unit="degree">
|
||||
<Key value="29.7070332" frame="7">
|
||||
<Tangent side="right" abscissaParam="1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="29.7070332" frame="10">
|
||||
<Tangent side="left" abscissaParam="-1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="29.7070332" frame="70">
|
||||
<Tangent side="left" abscissaParam="-20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RWristYaw" mute="false" unit="degree">
|
||||
<Key value="1.57964516" frame="7">
|
||||
<Tangent side="right" abscissaParam="1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="1.57964516" frame="10">
|
||||
<Tangent side="left" abscissaParam="-1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="1.57964516" frame="70">
|
||||
<Tangent side="left" abscissaParam="-20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
<ActuatorCurve fps="25" actuator="RHand" mute="false" unit="dimensionless">
|
||||
<Key value="0.588752136" frame="7">
|
||||
<Tangent side="right" abscissaParam="1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.588752136" frame="10">
|
||||
<Tangent side="left" abscissaParam="-1" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
<Tangent side="right" abscissaParam="20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
<Key value="0.588752136" frame="70">
|
||||
<Tangent side="left" abscissaParam="-20" ordinateParam="0" editor:interpType="bezier_auto"/>
|
||||
</Key>
|
||||
</ActuatorCurve>
|
||||
</Animation>
|
@@ -1,3 +1,4 @@
|
||||
<resources>
|
||||
<string name="app_name">Fitbot</string>
|
||||
<string name="oefeningvideo">oefeningvideo</string>
|
||||
</resources>
|
BIN
docs/documentation/android/VideoViewWidget.png
Normal file
BIN
docs/documentation/android/VideoViewWidget.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
23
docs/documentation/android/Videoview.md
Normal file
23
docs/documentation/android/Videoview.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# VideoView
|
||||
|
||||
We wanted to show the different exercises in a video that anybody could replicate. For this we didn't want to implement a youtube function we wanted to have our own videos so that we don't rely on youtube. Ti start we need an emoty activity file you can create one in the android studio IDE. Then you need to head to the XML file you just created and the go to widgets and the add the VideoView element
|
||||
|
||||

|
||||
|
||||
If you drag that in to your activity you can edit the layout of it but it will not function directly. To Let it play videos we need to write a java code. First start by coding what you want to view.
|
||||
```java
|
||||
VideoView videoView = findViewById(R.id.videoView);
|
||||
videoView.setVideoURI(Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.videofile));
|
||||
```
|
||||
replace the video file with the name of the video. Then you need to code the media player aswell.
|
||||
```java
|
||||
MediaController mediaController = new MediaController(this);
|
||||
videoView.setMediaController(mediaController);
|
||||
videoView.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
|
||||
@Override
|
||||
public void onCompletion(MediaPlayer mp) {
|
||||
videoView.start(); // Restart video on completion
|
||||
}
|
||||
});`
|
||||
```
|
||||
Since we have short videos we will have a auto replay function if you want it can go to a completion screen after the video ended.
|
49
docs/documentation/android/robotmovement.md
Normal file
49
docs/documentation/android/robotmovement.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# How to make the robot move
|
||||
|
||||
## Getting started
|
||||
First make a animation file in the /res folder.
|
||||
|
||||

|
||||
|
||||
Then right click it and click edit animation
|
||||
|
||||
## Making keyframes
|
||||
|
||||
Once you click edit animation you can click a bodypart and rotate it.
|
||||
|
||||

|
||||
|
||||
Once you have positioned the robot into your preffered position you can click the keyframe button.
|
||||
|
||||

|
||||
|
||||
You can grab and shift the keyframes around the timelines until you get something like this.
|
||||
|
||||

|
||||
|
||||
Make sure to save it under the File tab once it is done.
|
||||
|
||||
You can test it by clicking the play button in the top right.
|
||||
|
||||
## Making the robot move
|
||||
|
||||
Once you have made the animation file you can go to the robot movement script.
|
||||
|
||||
```java
|
||||
// create the animation
|
||||
Animation animation = AnimationBuilder.with(qiContext)
|
||||
//change bicepcurl to the name of your animation file
|
||||
.withResources(R.raw.bicepcurl)
|
||||
.build()
|
||||
|
||||
// create the animate object
|
||||
Animate animate = AnimateBuilder.with(qiContext)
|
||||
.withAnimation(animation)
|
||||
.build()
|
||||
|
||||
// play the animation
|
||||
animate.async().run();
|
||||
```
|
||||
|
||||
|
||||
If you run this on the robot the animation should play.
|
BIN
docs/documentation/assets/exampleAnimation.png
Normal file
BIN
docs/documentation/assets/exampleAnimation.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 97 KiB |
BIN
docs/documentation/assets/image.png
Normal file
BIN
docs/documentation/assets/image.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 133 KiB |
BIN
docs/documentation/assets/imageAnimation.png
Normal file
BIN
docs/documentation/assets/imageAnimation.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 93 KiB |
BIN
docs/documentation/assets/keyframebutton.png
Normal file
BIN
docs/documentation/assets/keyframebutton.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 97 KiB |
12
docs/personalDocs/Luca/weekly-reports/sprint-1-week-1.md
Normal file
12
docs/personalDocs/Luca/weekly-reports/sprint-1-week-1.md
Normal file
@@ -0,0 +1,12 @@
|
||||
## Summary week 1, sprint 1
|
||||
|
||||
---
|
||||
|
||||
As a team, we mostly worked together on figuring out what project we'd
|
||||
like to work on. We did this on the first day (Tuesday) and we decided to
|
||||
make a robot that promotes sports activities for the elderly.
|
||||
On Wednesday we started making graphs for the project, to visualize all the
|
||||
required components and how they would interact with each other.
|
||||
The rest of the time we were mostly working on figuring out how to work
|
||||
with Android Studio and QiSDK, which was quite a hassle.
|
||||
|
7
docs/personalDocs/Luca/weekly-reports/sprint-1-week-2.md
Normal file
7
docs/personalDocs/Luca/weekly-reports/sprint-1-week-2.md
Normal file
@@ -0,0 +1,7 @@
|
||||
## Summary week 2, sprint 1
|
||||
|
||||
---
|
||||
|
||||
In the second week, most of us figured out how to work with the IDE
|
||||
and got the SDK's to work. We've made the robot say things, and we're
|
||||
currently working on adding a UI part to the robot.
|
@@ -5,10 +5,10 @@ Naam Student: Sam Hos <br>
|
||||
Datum: 22-04-2024
|
||||
|
||||
### A. onderwerp
|
||||
Het betoog gaat over de de implicaties van AI op het onderwijs.
|
||||
Het betoog gaat over de de implicaties van AI op het onderwijs.
|
||||
|
||||
### B. aanleiding
|
||||
De aanleiding voor dit onderzoek is omdat AI groter dan ooit is op dit moment en het overal in het onderwijs gebruikt word.
|
||||
De aanleiding voor dit onderzoek is omdat AI groter dan ooit is op dit moment en het overal in het onderwijs gebruikt word. Ik ben vooral geinteresseerd in hoe studenten er gebruik van maken en wat de gevolgen daarvan zijn voor in de toekomst.
|
||||
|
||||
### C. afbakening
|
||||
Ik leg mijn focus op hoe studenten er gebruik van maken en wat daar de gevolgen van zijn.
|
||||
|
Reference in New Issue
Block a user