added image buttons and change mainscreen to powerscreen
This commit is contained in:
1
code/src/Fitbot/.idea/misc.xml
generated
1
code/src/Fitbot/.idea/misc.xml
generated
@@ -7,6 +7,7 @@
|
|||||||
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_completion_screen.xml" value="0.10078125" />
|
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_completion_screen.xml" value="0.10078125" />
|
||||||
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_main.xml" value="0.1" />
|
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_main.xml" value="0.1" />
|
||||||
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_main_screen.xml" value="0.15" />
|
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_main_screen.xml" value="0.15" />
|
||||||
|
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_power_screen.xml" value="0.1" />
|
||||||
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_sport_item.xml" value="0.16336633663366337" />
|
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_sport_item.xml" value="0.16336633663366337" />
|
||||||
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_sport_menu.xml" value="0.16" />
|
<entry key="..\:/Users/31687/muupooviixee66-1/code/src/Fitbot/app/src/main/res/layout/activity_sport_menu.xml" value="0.16" />
|
||||||
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_main.xml" value="0.1" />
|
<entry key="..\:/Users/sebas/Documents/HvA/Reposetories/muupooviixee66/code/src/Fitbot/app/src/main/res/layout/activity_main.xml" value="0.1" />
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
android:name=".BicepVideo"
|
android:name=".BicepVideo"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainScreen"
|
android:name=".PowerScreen"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
|
@@ -1,22 +0,0 @@
|
|||||||
package com.example.fitbot;
|
|
||||||
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.support.v7.app.AppCompatActivity;
|
|
||||||
import android.widget.Button;
|
|
||||||
|
|
||||||
public class MainScreen extends AppCompatActivity {
|
|
||||||
Button button;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_main_screen);
|
|
||||||
|
|
||||||
button = findViewById(R.id.open_BicepVideo);
|
|
||||||
button.setOnClickListener(v -> {
|
|
||||||
Intent i = new Intent(MainScreen.this, BicepVideo.class);
|
|
||||||
startActivity(i);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,43 @@
|
|||||||
|
package com.example.fitbot;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.v7.app.AppCompatActivity;
|
||||||
|
import android.widget.ImageButton;
|
||||||
|
|
||||||
|
public class PowerScreen extends AppCompatActivity {
|
||||||
|
ImageButton openBicepVideo;
|
||||||
|
ImageButton openSquatVideo;
|
||||||
|
ImageButton openTricepVideo;
|
||||||
|
ImageButton goToHome;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_power_screen);
|
||||||
|
|
||||||
|
openBicepVideo = findViewById(R.id.open_BicepVideo);
|
||||||
|
openSquatVideo = findViewById(R.id.open_SquatVideo);
|
||||||
|
openTricepVideo = findViewById(R.id.open_TricepVideo);
|
||||||
|
goToHome = findViewById(R.id.GoToHome);
|
||||||
|
|
||||||
|
openBicepVideo.setOnClickListener(v -> {
|
||||||
|
Intent intent = new Intent(PowerScreen.this, BicepVideo.class);
|
||||||
|
startActivity(intent);
|
||||||
|
});
|
||||||
|
openSquatVideo.setOnClickListener(v -> {
|
||||||
|
Intent intent = new Intent(PowerScreen.this, SquatVideo.class);
|
||||||
|
startActivity(intent);
|
||||||
|
});
|
||||||
|
|
||||||
|
openTricepVideo.setOnClickListener(v -> {
|
||||||
|
Intent intent = new Intent(PowerScreen.this, TricepVideo.class);
|
||||||
|
startActivity(intent);
|
||||||
|
});
|
||||||
|
|
||||||
|
goToHome.setOnClickListener(v -> {
|
||||||
|
Intent intent = new Intent(PowerScreen.this, MainActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
BIN
code/src/Fitbot/app/src/main/res/drawable/house_3.png
Normal file
BIN
code/src/Fitbot/app/src/main/res/drawable/house_3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
code/src/Fitbot/app/src/main/res/drawable/noun_bicep_499185.png
Normal file
BIN
code/src/Fitbot/app/src/main/res/drawable/noun_bicep_499185.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
BIN
code/src/Fitbot/app/src/main/res/drawable/squatlogo.png
Normal file
BIN
code/src/Fitbot/app/src/main/res/drawable/squatlogo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.2 KiB |
BIN
code/src/Fitbot/app/src/main/res/drawable/triceplogo.png
Normal file
BIN
code/src/Fitbot/app/src/main/res/drawable/triceplogo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
@@ -1,24 +0,0 @@
|
|||||||
<?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="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
tools:context=".MainScreen">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
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="Bicep Oefening"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintVertical_bias="1.0" />
|
|
||||||
|
|
||||||
</android.support.constraint.ConstraintLayout>
|
|
@@ -0,0 +1,84 @@
|
|||||||
|
<?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="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".PowerScreen">
|
||||||
|
|
||||||
|
<!-- <Button-->
|
||||||
|
<!-- 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="Bicep Oefening"-->
|
||||||
|
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||||
|
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||||
|
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||||
|
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||||
|
<!-- app:layout_constraintVertical_bias="1.0" />-->
|
||||||
|
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/open_BicepVideo"
|
||||||
|
android:layout_width="330dp"
|
||||||
|
android:layout_height="300dp"
|
||||||
|
android:layout_marginStart="120dp"
|
||||||
|
android:layout_marginTop="60dp"
|
||||||
|
android:layout_marginEnd="190dp"
|
||||||
|
android:layout_marginBottom="40dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/open_SquatVideo"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/open_TricepVideo"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:srcCompat="@drawable/noun_bicep_499185"
|
||||||
|
android:contentDescription="Open bicep exercise video" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/open_SquatVideo"
|
||||||
|
android:layout_width="330dp"
|
||||||
|
android:layout_height="300dp"
|
||||||
|
android:layout_marginStart="120dp"
|
||||||
|
android:layout_marginTop="40dp"
|
||||||
|
android:layout_marginEnd="190dp"
|
||||||
|
android:layout_marginBottom="60dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/GoToHome"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/open_BicepVideo"
|
||||||
|
app:srcCompat="@drawable/squatlogo"
|
||||||
|
android:contentDescription="Open squad exercise video" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/open_TricepVideo"
|
||||||
|
android:layout_width="330dp"
|
||||||
|
android:layout_height="300dp"
|
||||||
|
android:layout_marginStart="190dp"
|
||||||
|
android:layout_marginTop="60dp"
|
||||||
|
android:layout_marginEnd="120dp"
|
||||||
|
android:layout_marginBottom="40dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/GoToHome"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/open_BicepVideo"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:srcCompat="@drawable/triceplogo"
|
||||||
|
android:contentDescription="Open tricep exercise video" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/GoToHome"
|
||||||
|
android:layout_width="330dp"
|
||||||
|
android:layout_height="300dp"
|
||||||
|
android:layout_marginStart="190dp"
|
||||||
|
android:layout_marginTop="40dp"
|
||||||
|
android:layout_marginEnd="120dp"
|
||||||
|
android:layout_marginBottom="60dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/open_SquatVideo"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/open_TricepVideo"
|
||||||
|
app:srcCompat="@drawable/house_3"
|
||||||
|
android:contentDescription="Go to Home Screen" />
|
||||||
|
</android.support.constraint.ConstraintLayout>
|
Reference in New Issue
Block a user