Commit 30ebe44f authored by Weesinghe W.M.P.D's avatar Weesinghe W.M.P.D

Added new exercises

parent 6e9580be
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
android:value="" /> android:value="" />
</activity> </activity>
<activity <activity
android:name=".activities.FirstActivity" android:name=".MainActivity"
android:exported="true"> android:exported="true">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
...@@ -240,17 +240,10 @@ ...@@ -240,17 +240,10 @@
<activity <activity
android:name=".activities.LaunchActivity" android:name=".activities.LaunchActivity"
android:exported="false" /> android:exported="false" />
<activity <activity
android:name=".activities.ShowPeopleActivity" android:name=".activities.ShowPeopleActivity"
android:exported="false"/> android:exported="false"/>
<activity
android:name=".MainActivity"
android:exported="false">
</activity>
<meta-data <meta-data
android:name="com.google.ar.core" android:name="com.google.ar.core"
android:value="required" /> android:value="required" />
......
...@@ -9,6 +9,7 @@ import android.util.Log; ...@@ -9,6 +9,7 @@ import android.util.Log;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
import com.example.thetrek.activities.ShowPeopleActivity;
import com.example.thetrek.db.LocationDAO; import com.example.thetrek.db.LocationDAO;
import com.example.thetrek.db.LocationsDbHelper; import com.example.thetrek.db.LocationsDbHelper;
import com.example.thetrek.db.RewardDbHelper; import com.example.thetrek.db.RewardDbHelper;
...@@ -51,7 +52,7 @@ public class HomeActivity extends AppCompatActivity { ...@@ -51,7 +52,7 @@ public class HomeActivity extends AppCompatActivity {
activityRecognitionButton.setOnClickListener(new View.OnClickListener() { activityRecognitionButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
Intent intent = new Intent(v.getContext(), MainActivityRecognition.class); Intent intent = new Intent(v.getContext(), ShowPeopleActivity.class);
v.getContext().startActivity(intent); v.getContext().startActivity(intent);
} }
}); });
......
...@@ -8,6 +8,7 @@ import android.widget.TextView; ...@@ -8,6 +8,7 @@ import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import com.example.thetrek.MainActivityRecognition;
import com.google.gson.Gson; import com.google.gson.Gson;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
...@@ -76,6 +77,14 @@ public class DetailActivity extends AppCompatActivity { ...@@ -76,6 +77,14 @@ public class DetailActivity extends AppCompatActivity {
// } // }
// } // }
// }); // });
findViewById(R.id.activityrecognise).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(DetailActivity.this, MainActivityRecognition.class);
startActivity(intent);
}
});
findViewById(R.id.progress_picture).setOnClickListener(new View.OnClickListener() { findViewById(R.id.progress_picture).setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
...@@ -84,6 +93,7 @@ public class DetailActivity extends AppCompatActivity { ...@@ -84,6 +93,7 @@ public class DetailActivity extends AppCompatActivity {
} }
}); });
findViewById(R.id.email_self).setOnClickListener(new View.OnClickListener() { findViewById(R.id.email_self).setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
......
package com.example.thetrek.activities;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import androidx.appcompat.app.AppCompatActivity;
import com.example.thetrek.R;
public class FirstActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_firstpage);
Button start = findViewById(R.id.get_started);
start.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
System.out.println("Before calling list intent");
Intent intentlist = new Intent(FirstActivity.this, ShowPeopleActivity.class);
startActivity(intentlist);
}
});
}
}
...@@ -36,13 +36,6 @@ public class LaunchActivity extends AppCompatActivity { ...@@ -36,13 +36,6 @@ public class LaunchActivity extends AppCompatActivity {
} }
}); });
findViewById(R.id.dance).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(LaunchActivity.this, DanceActivity.class);
startActivity(intent);
}
});
findViewById(R.id.dance).setOnClickListener(new View.OnClickListener() { findViewById(R.id.dance).setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
......
...@@ -113,8 +113,9 @@ ...@@ -113,8 +113,9 @@
<Button <Button
android:id="@+id/save" android:id="@+id/save"
android:layout_width="115dp" android:layout_width="match_parent"
android:layout_height="60dp" android:layout_height="65dp"
android:backgroundTint="#5D71C9"
android:text="@string/save" android:text="@string/save"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
android:background="@drawable/background" android:background="@drawable/background"
tools:context=".activities.DetailActivity"> tools:context=".activities.DetailActivity">
<ImageView <ImageView
android:id="@+id/gender" android:id="@+id/gender"
android:layout_width="120dp" android:layout_width="120dp"
...@@ -66,57 +64,71 @@ ...@@ -66,57 +64,71 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" /> app:layout_constraintEnd_toEndOf="parent" />
<Button <Button
android:id="@+id/display_exercises" android:id="@+id/display_exercises"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="75dp" android:layout_height="65dp"
android:text="@string/display_poses" android:layout_marginTop="16dp"
android:text="Display Yoga Poses"
android:textSize="12sp" android:textSize="12sp"
android:layout_marginTop="65dp"
app:layout_constraintTop_toBottomOf="@id/weight" app:layout_constraintTop_toBottomOf="@id/weight"
app:layout_constraintBottom_toTopOf="@id/stopwatch"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
/> android:backgroundTint="#5D71C9"/>
<Button <Button
android:id="@+id/stopwatch" android:id="@+id/stopwatch"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="75dp" android:layout_height="65dp"
android:text="@string/stopwatch" android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:text="Stop Watch"
android:textSize="12sp" android:textSize="12sp"
app:layout_constraintTop_toBottomOf="@id/display_exercises" app:layout_constraintTop_toBottomOf="@id/display_exercises"
app:layout_constraintBottom_toTopOf="@id/progress_picture"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toStartOf="@id/activityrecognise"
/> android:backgroundTint="#5D71C9"/>
<Button
android:id="@+id/activityrecognise"
android:layout_width="0dp"
android:layout_height="65dp"
android:layout_marginTop="16dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:text="Activity Recognition"
android:textSize="12sp"
app:layout_constraintTop_toBottomOf="@id/display_exercises"
app:layout_constraintStart_toEndOf="@id/stopwatch"
android:backgroundTint="#5D71C9"/>
<Button <Button
android:id="@+id/progress_picture" android:id="@+id/progress_picture"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="75dp" android:layout_height="65dp"
android:text="Physical Activity" android:text="Physical Activity"
android:textSize="12sp" android:textSize="12sp"
android:layout_marginBottom="12dp" android:layout_marginTop="16dp"
android:layout_marginEnd="200dp" android:layout_marginEnd="8dp"
app:layout_constraintTop_toBottomOf="@id/stopwatch" app:layout_constraintTop_toBottomOf="@id/stopwatch"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/email_self" app:layout_constraintEnd_toStartOf="@id/email_self"
/> android:backgroundTint="#5D71C9"/>
<Button <Button
android:id="@+id/email_self" android:id="@+id/email_self"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="75dp" android:layout_height="65dp"
android:text="@string/send_email_to_self" android:text="@string/send_email_to_self"
android:textSize="12sp" android:textSize="12sp"
android:layout_marginStart="200dp" android:layout_marginTop="16dp"
android:layout_marginBottom="12dp" android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
app:layout_constraintTop_toBottomOf="@id/stopwatch" app:layout_constraintTop_toBottomOf="@id/stopwatch"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/progress_picture" app:layout_constraintStart_toEndOf="@id/progress_picture"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
/> android:backgroundTint="#5D71C9"/>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:paddingTop = "1dp" android:paddingTop = "1dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Select what to train:" android:text="Select what to train"
android:textColor="@color/black" android:textColor="@color/black"
android:textStyle="bold|italic" android:textStyle="bold"
android:textSize="20sp" android:textSize="20sp"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:text="@string/mind" android:text="@string/mind"
android:backgroundTint="#5D71C9"
android:layout_marginTop="80dp" android:layout_marginTop="80dp"
android:layout_marginStart="50dp" android:layout_marginStart="50dp"
app:layout_constraintTop_toBottomOf="@id/selection" app:layout_constraintTop_toBottomOf="@id/selection"
...@@ -39,6 +40,7 @@ ...@@ -39,6 +40,7 @@
android:id="@+id/back" android:id="@+id/back"
android:layout_gravity="center" android:layout_gravity="center"
android:text="Back" android:text="Back"
android:backgroundTint="#5D71C9"
android:layout_marginTop="120dp" android:layout_marginTop="120dp"
android:layout_marginEnd="35dp" android:layout_marginEnd="35dp"
app:layout_constraintTop_toBottomOf="@+id/selection" app:layout_constraintTop_toBottomOf="@+id/selection"
...@@ -51,6 +53,7 @@ ...@@ -51,6 +53,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:text="@string/abdominal" android:text="@string/abdominal"
android:backgroundTint="#5D71C9"
android:layout_marginTop="250dp" android:layout_marginTop="250dp"
android:layout_marginEnd="40dp" android:layout_marginEnd="40dp"
app:layout_constraintTop_toBottomOf="@id/selection" app:layout_constraintTop_toBottomOf="@id/selection"
...@@ -63,6 +66,7 @@ ...@@ -63,6 +66,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:text="@string/legs" android:text="@string/legs"
android:backgroundTint="#5D71C9"
android:layout_marginTop="450dp" android:layout_marginTop="450dp"
android:layout_marginEnd="40dp" android:layout_marginEnd="40dp"
app:layout_constraintTop_toBottomOf="@id/selection" app:layout_constraintTop_toBottomOf="@id/selection"
......
...@@ -72,6 +72,7 @@ ...@@ -72,6 +72,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
android:text="@string/send"/> android:text="@string/send"
android:backgroundTint="#5D71C9"/>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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=".activities.LaunchActivity"
android:background="@drawable/yoga_background">
<Button
android:id="@+id/get_started"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:text="Get Started"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="100dp"
/>
</RelativeLayout>
\ No newline at end of file
...@@ -5,55 +5,57 @@ ...@@ -5,55 +5,57 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".activities.LaunchActivity" tools:context=".activities.LaunchActivity"
android:background="@drawable/yoga_background"> android:background="@drawable/background">
<TextView <TextView
android:id="@+id/text1" android:layout_width="match_parent"
android:layout_width="200dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="600dp"
android:text="Craft Your Active Adventure" android:text="Craft Your Active Adventure"
android:textSize="24dp"
android:textAlignment="center"
android:layout_marginTop="10dp"
android:textStyle="bold" android:textStyle="bold"
android:textSize="10pt"/> android:textColor="@color/cardview_dark_background"></TextView>
<Button <Button
android:id="@+id/workouts" android:id="@+id/outdoor"
android:layout_width="200dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="65dp"
android:text="Alternative Fitness Workouts"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_marginBottom="400dp" android:layout_centerHorizontal="true"
/> android:layout_marginBottom="100dp"
android:text="Adventure and Outdoor Activities"
android:backgroundTint="#5D71C9"/>
<Button <Button
android:id="@+id/sports" android:id="@+id/sports"
android:layout_width="200dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="65dp"
android:text="Unique Sports and Games" android:text="Unique Sports and Games"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_marginBottom="300dp" android:layout_marginBottom="300dp"
/> android:backgroundTint="#5D71C9" />
<Button <Button
android:id="@+id/dance" android:id="@+id/dance"
android:layout_width="200dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="65dp"
android:text="Dance and Movement Arts" android:text="Dance and Movement Arts"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_marginBottom="200dp" android:layout_marginBottom="200dp"
/> android:backgroundTint="#5D71C9"/>
<Button <Button
android:id="@+id/outdoor" android:id="@+id/workouts"
android:layout_width="200dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="65dp"
android:layout_alignParentBottom="true" android:text="Alternative Fitness Workouts"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginBottom="100dp" android:layout_alignParentBottom="true"
android:text="Adventure and Outdoor Activities" /> android:layout_marginBottom="400dp"
android:backgroundTint="#5D71C9"/>
</RelativeLayout> </RelativeLayout>
\ No newline at end of file
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
android:gravity="center" android:gravity="center"
android:autoSizeTextType="uniform" android:autoSizeTextType="uniform"
android:textColor="@color/black" android:textColor="@color/black"
android:textStyle="bold"
android:maxLines="1" android:maxLines="1"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"/> app:layout_constraintStart_toStartOf="parent"/>
...@@ -48,7 +49,8 @@ ...@@ -48,7 +49,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/add" android:text="@string/add"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/> app:layout_constraintBottom_toBottomOf="parent"
android:backgroundTint="#5D71C9"/>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:onClick="onClickStart" android:onClick="onClickStart"
android:text="@string/start" android:text="@string/start"
android:backgroundTint="#5D71C9"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/stop_button" app:layout_constraintEnd_toStartOf="@id/stop_button"
app:layout_constraintTop_toBottomOf="@id/time_view" /> app:layout_constraintTop_toBottomOf="@id/time_view" />
...@@ -39,6 +40,7 @@ ...@@ -39,6 +40,7 @@
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:onClick="onClickStop" android:onClick="onClickStop"
android:text="@string/stop" android:text="@string/stop"
android:backgroundTint="#5D71C9"
app:layout_constraintStart_toEndOf="@id/start_button" app:layout_constraintStart_toEndOf="@id/start_button"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/time_view" /> app:layout_constraintTop_toBottomOf="@id/time_view" />
...@@ -50,6 +52,7 @@ ...@@ -50,6 +52,7 @@
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:onClick="onClickReset" android:onClick="onClickReset"
android:text="@string/reset" android:text="@string/reset"
android:backgroundTint="#5D71C9"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/start_button" /> app:layout_constraintTop_toBottomOf="@id/start_button" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment