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 @@
android:value="" />
</activity>
<activity
android:name=".activities.FirstActivity"
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
......@@ -240,17 +240,10 @@
<activity
android:name=".activities.LaunchActivity"
android:exported="false" />
<activity
android:name=".activities.ShowPeopleActivity"
android:exported="false"/>
<activity
android:name=".MainActivity"
android:exported="false">
</activity>
<meta-data
android:name="com.google.ar.core"
android:value="required" />
......
......@@ -9,6 +9,7 @@ import android.util.Log;
import android.view.View;
import android.widget.Button;
import com.example.thetrek.activities.ShowPeopleActivity;
import com.example.thetrek.db.LocationDAO;
import com.example.thetrek.db.LocationsDbHelper;
import com.example.thetrek.db.RewardDbHelper;
......@@ -51,7 +52,7 @@ public class HomeActivity extends AppCompatActivity {
activityRecognitionButton.setOnClickListener(new View.OnClickListener() {
@Override
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);
}
});
......
......@@ -8,6 +8,7 @@ import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import com.example.thetrek.MainActivityRecognition;
import com.google.gson.Gson;
import java.text.SimpleDateFormat;
......@@ -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() {
@Override
public void onClick(View v) {
......@@ -84,6 +93,7 @@ public class DetailActivity extends AppCompatActivity {
}
});
findViewById(R.id.email_self).setOnClickListener(new View.OnClickListener() {
@Override
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 {
}
});
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() {
@Override
public void onClick(View v) {
......
......@@ -113,8 +113,9 @@
<Button
android:id="@+id/save"
android:layout_width="115dp"
android:layout_height="60dp"
android:layout_width="match_parent"
android:layout_height="65dp"
android:backgroundTint="#5D71C9"
android:text="@string/save"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
......
......@@ -8,8 +8,6 @@
android:background="@drawable/background"
tools:context=".activities.DetailActivity">
<ImageView
android:id="@+id/gender"
android:layout_width="120dp"
......@@ -66,57 +64,71 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<Button
android:id="@+id/display_exercises"
android:layout_width="match_parent"
android:layout_height="75dp"
android:text="@string/display_poses"
android:layout_height="65dp"
android:layout_marginTop="16dp"
android:text="Display Yoga Poses"
android:textSize="12sp"
android:layout_marginTop="65dp"
app:layout_constraintTop_toBottomOf="@id/weight"
app:layout_constraintBottom_toTopOf="@id/stopwatch"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
/>
android:backgroundTint="#5D71C9"/>
<Button
android:id="@+id/stopwatch"
android:layout_width="match_parent"
android:layout_height="75dp"
android:text="@string/stopwatch"
android:layout_width="0dp"
android:layout_height="65dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:text="Stop Watch"
android:textSize="12sp"
app:layout_constraintTop_toBottomOf="@id/display_exercises"
app:layout_constraintBottom_toTopOf="@id/progress_picture"
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
android:id="@+id/progress_picture"
android:layout_width="match_parent"
android:layout_height="75dp"
android:layout_width="0dp"
android:layout_height="65dp"
android:text="Physical Activity"
android:textSize="12sp"
android:layout_marginBottom="12dp"
android:layout_marginEnd="200dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
app:layout_constraintTop_toBottomOf="@id/stopwatch"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/email_self"
/>
android:backgroundTint="#5D71C9"/>
<Button
android:id="@+id/email_self"
android:layout_width="match_parent"
android:layout_height="75dp"
android:layout_width="0dp"
android:layout_height="65dp"
android:text="@string/send_email_to_self"
android:textSize="12sp"
android:layout_marginStart="200dp"
android:layout_marginBottom="12dp"
android:layout_marginTop="16dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
app:layout_constraintTop_toBottomOf="@id/stopwatch"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/progress_picture"
app:layout_constraintEnd_toEndOf="parent"
/>
android:backgroundTint="#5D71C9"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -13,9 +13,9 @@
android:layout_width="wrap_content"
android:paddingTop = "1dp"
android:layout_height="wrap_content"
android:text="Select what to train:"
android:text="Select what to train"
android:textColor="@color/black"
android:textStyle="bold|italic"
android:textStyle="bold"
android:textSize="20sp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
......@@ -28,6 +28,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/mind"
android:backgroundTint="#5D71C9"
android:layout_marginTop="80dp"
android:layout_marginStart="50dp"
app:layout_constraintTop_toBottomOf="@id/selection"
......@@ -39,6 +40,7 @@
android:id="@+id/back"
android:layout_gravity="center"
android:text="Back"
android:backgroundTint="#5D71C9"
android:layout_marginTop="120dp"
android:layout_marginEnd="35dp"
app:layout_constraintTop_toBottomOf="@+id/selection"
......@@ -51,6 +53,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/abdominal"
android:backgroundTint="#5D71C9"
android:layout_marginTop="250dp"
android:layout_marginEnd="40dp"
app:layout_constraintTop_toBottomOf="@id/selection"
......@@ -63,6 +66,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/legs"
android:backgroundTint="#5D71C9"
android:layout_marginTop="450dp"
android:layout_marginEnd="40dp"
app:layout_constraintTop_toBottomOf="@id/selection"
......
......@@ -72,6 +72,7 @@
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:text="@string/send"/>
android:text="@string/send"
android:backgroundTint="#5D71C9"/>
</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 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.LaunchActivity"
android:background="@drawable/yoga_background">
android:background="@drawable/background">
<TextView
android:id="@+id/text1"
android:layout_width="200dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="600dp"
android:text="Craft Your Active Adventure"
android:textSize="24dp"
android:textAlignment="center"
android:layout_marginTop="10dp"
android:textStyle="bold"
android:textSize="10pt"/>
android:textColor="@color/cardview_dark_background"></TextView>
<Button
android:id="@+id/workouts"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:text="Alternative Fitness Workouts"
android:layout_centerHorizontal="true"
android:id="@+id/outdoor"
android:layout_width="wrap_content"
android:layout_height="65dp"
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
android:id="@+id/sports"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_height="65dp"
android:text="Unique Sports and Games"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="300dp"
/>
android:backgroundTint="#5D71C9" />
<Button
android:id="@+id/dance"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_height="65dp"
android:text="Dance and Movement Arts"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="200dp"
/>
android:backgroundTint="#5D71C9"/>
<Button
android:id="@+id/outdoor"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:id="@+id/workouts"
android:layout_width="wrap_content"
android:layout_height="65dp"
android:text="Alternative Fitness Workouts"
android:layout_centerHorizontal="true"
android:layout_marginBottom="100dp"
android:text="Adventure and Outdoor Activities" />
android:layout_alignParentBottom="true"
android:layout_marginBottom="400dp"
android:backgroundTint="#5D71C9"/>
</RelativeLayout>
\ No newline at end of file
......@@ -15,6 +15,7 @@
android:gravity="center"
android:autoSizeTextType="uniform"
android:textColor="@color/black"
android:textStyle="bold"
android:maxLines="1"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"/>
......@@ -48,7 +49,8 @@
android:layout_height="wrap_content"
android:text="@string/add"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
app:layout_constraintBottom_toBottomOf="parent"
android:backgroundTint="#5D71C9"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -28,6 +28,7 @@
android:layout_marginTop="20dp"
android:onClick="onClickStart"
android:text="@string/start"
android:backgroundTint="#5D71C9"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/stop_button"
app:layout_constraintTop_toBottomOf="@id/time_view" />
......@@ -39,6 +40,7 @@
android:layout_marginTop="20dp"
android:onClick="onClickStop"
android:text="@string/stop"
android:backgroundTint="#5D71C9"
app:layout_constraintStart_toEndOf="@id/start_button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/time_view" />
......@@ -50,6 +52,7 @@
android:layout_marginTop="20dp"
android:onClick="onClickReset"
android:text="@string/reset"
android:backgroundTint="#5D71C9"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
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