refactor: Move EndScreenActivity to ui.activities package

This commit is contained in:
Niels Gras
2024-05-21 15:24:02 +02:00
parent 9f87fb5e6f
commit 831fd06489
3 changed files with 7 additions and 11 deletions

View File

@@ -22,7 +22,7 @@
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/Theme.Fitbot" > android:theme="@style/Theme.Fitbot" >
<activity <activity
android:name=".EndScreenActivity" android:name=".ui.activities.EndScreenActivity"
android:exported="false" /> android:exported="false" />
<activity <activity
android:name=".ui.activities.FitnessActivity" android:name=".ui.activities.FitnessActivity"

View File

@@ -1,10 +1,10 @@
package com.example.fitbot; package com.example.fitbot.ui.activities;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.widget.Button;
import com.example.fitbot.R;
import com.example.fitbot.ui.activities.FitnessActivity;
import com.example.fitbot.ui.activities.MainActivity; import com.example.fitbot.ui.activities.MainActivity;
public class EndScreenActivity extends AppCompatActivity { public class EndScreenActivity extends AppCompatActivity {
@@ -13,12 +13,8 @@ public class EndScreenActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_end_screen); setContentView(R.layout.activity_end_screen);
Button homeButton = findViewById(R.id.homeButton);
homeButton.setOnClickListener(v -> { com.example.fitbot.util.ButtonNavigation.setupButtonNavigation(this, R.id.homeButton, MainActivity.class);
Intent intent = new Intent(EndScreenActivity.this, MainActivity.class); com.example.fitbot.util.ButtonNavigation.setupButtonNavigation(this, R.id.continueButton, FitnessActivity.class);
startActivity(intent);
finish();
});
} }
} }

View File

@@ -5,7 +5,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".EndScreenActivity"> tools:context=".ui.activities.EndScreenActivity">
<View <View
android:id="@+id/myRectangleView" android:id="@+id/myRectangleView"