Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
<activity android:name=".ReservationFormActivity" />
<activity android:name=".ContactInformationActivity" />
<activity android:name=".ConfirmationActivity" />
<activity android:name=".SuccessfulBookingActivity" />
<activity android:name=".HomeScreenActivity" />
</application>

</manifest>
19 changes: 19 additions & 0 deletions app/src/main/java/com/bscpe3g/sugboeats/ConfirmationActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

Expand Down Expand Up @@ -93,5 +95,22 @@ protected void onCreate(Bundle savedInstanceState) {
backIntent.putExtra("restaurant", restaurant);
startActivity(backIntent);
});
Button makeReservationButton = findViewById(R.id.button_make_reservation2);
makeReservationButton.setOnClickListener(v -> {
Intent successfulBookingIntent = new Intent(ConfirmationActivity.this, SuccessfulBookingActivity.class);
successfulBookingIntent.putExtra("firstName", firstName);
successfulBookingIntent.putExtra("lastName", lastName);
successfulBookingIntent.putExtra("phoneNumber", phoneNumber);
successfulBookingIntent.putExtra("emailAddress", emailAddress);
successfulBookingIntent.putExtra("customerAddress", customerAddress);
successfulBookingIntent.putExtra("reservationDate", reservationDate);
successfulBookingIntent.putExtra("reservationTime", reservationTime);
successfulBookingIntent.putExtra("settingType", settingType);
successfulBookingIntent.putExtra("numberOfGuests", numberOfGuests);
successfulBookingIntent.putExtra("specialRequests", specialRequests);
successfulBookingIntent.putExtra("restaurant", restaurant);
startActivity(successfulBookingIntent);
});
}
}

99 changes: 99 additions & 0 deletions app/src/main/java/com/bscpe3g/sugboeats/HomeScreenActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
package com.bscpe3g.sugboeats;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;

import androidx.appcompat.app.AppCompatActivity;

public class HomeScreenActivity extends AppCompatActivity {
private ImageButton homescreenSale1;
private ImageButton homescreenSale2;
private ImageButton resto1;
private ImageButton resto2;
private ImageButton resto3;
private ImageButton resto4;
private ImageButton resto5;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home_screen);

// Find views by their ID
homescreenSale1 = findViewById(R.id.homescreen_sale1);
homescreenSale2 = findViewById(R.id.homescreen_sale2);
resto1 = findViewById(R.id.resto1);
resto2 = findViewById(R.id.resto2);
resto3 = findViewById(R.id.resto3);
resto4 = findViewById(R.id.resto4);
resto5 = findViewById(R.id.resto5);

// Set a click listener on the search button

homescreenSale1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Create an Intent to start the SecondActivity
Intent intent = new Intent(HomeScreenActivity.this, Resto4Activity.class);
startActivity(intent);
}
});

// Set a click listener on homescreen_sale2 ImageButton to start a new activity
homescreenSale2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Create an Intent to start the ThirdActivity (for example)
Intent intent = new Intent(HomeScreenActivity.this, Resto5Activity.class);
startActivity(intent);
}
});

resto1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Navigate to the desired activity, e.g., Resto1Activity
Intent intent = new Intent(HomeScreenActivity.this, Resto1Activity.class);
startActivity(intent);
}
});

resto2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Navigate to the desired activity, e.g., Resto2Activity
Intent intent = new Intent(HomeScreenActivity.this, Resto2Activity.class);
startActivity(intent);
}
});

resto3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Navigate to the desired activity, e.g., Resto2Activity
Intent intent = new Intent(HomeScreenActivity.this, Resto3Activity.class);
startActivity(intent);
}
});

resto4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Navigate to the desired activity, e.g., Resto2Activity
Intent intent = new Intent(HomeScreenActivity.this, Resto4Activity.class);
startActivity(intent);
}
});

resto5.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Navigate to the desired activity, e.g., Resto2Activity
Intent intent = new Intent(HomeScreenActivity.this, Resto5Activity.class);
startActivity(intent);
}
});
}
}
8 changes: 8 additions & 0 deletions app/src/main/java/com/bscpe3g/sugboeats/Resto1Activity.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.widget.Button;
import android.widget.ImageView;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
Expand All @@ -17,6 +18,7 @@
public class Resto1Activity extends AppCompatActivity {

private Button makeReservationButton;
private ImageView backButton;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand Down Expand Up @@ -56,5 +58,11 @@ protected void onCreate(Bundle savedInstanceState) {
intent.putExtra("restaurant", restaurant);
startActivity(intent);
});

ImageView backButton = findViewById(R.id.back_button_resto1); // Ensure correct ID
backButton.setOnClickListener(v -> {
Intent intent = new Intent(Resto1Activity.this, HomeScreenActivity.class);
startActivity(intent); // Added to start the HomeScreenActivity
});
}
}
8 changes: 8 additions & 0 deletions app/src/main/java/com/bscpe3g/sugboeats/Resto2Activity.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.widget.Button;
import android.widget.ImageView;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
Expand All @@ -18,6 +19,7 @@
public class Resto2Activity extends AppCompatActivity {

private Button makeReservationButton;
private ImageView backButton;

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down Expand Up @@ -58,5 +60,11 @@ protected void onCreate(Bundle savedInstanceState) {
intent.putExtra("restaurant", restaurant);
startActivity(intent);
});

ImageView backButton = findViewById(R.id.back_button_resto2); // Ensure correct ID
backButton.setOnClickListener(v -> {
Intent intent = new Intent(Resto2Activity.this, HomeScreenActivity.class);
startActivity(intent); // Added to start the HomeScreenActivity
});
}
}
8 changes: 8 additions & 0 deletions app/src/main/java/com/bscpe3g/sugboeats/Resto3Activity.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.widget.Button;
import android.widget.ImageView;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
Expand All @@ -18,6 +19,7 @@
public class Resto3Activity extends AppCompatActivity {

private Button makeReservationButton;
private ImageView backButton;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand Down Expand Up @@ -57,5 +59,11 @@ protected void onCreate(Bundle savedInstanceState) {
intent.putExtra("restaurant", restaurant);
startActivity(intent);
});

ImageView backButton = findViewById(R.id.back_button_resto3); // Ensure correct ID
backButton.setOnClickListener(v -> {
Intent intent = new Intent(Resto3Activity.this, HomeScreenActivity.class);
startActivity(intent); // Added to start the HomeScreenActivity
});
}
}
8 changes: 8 additions & 0 deletions app/src/main/java/com/bscpe3g/sugboeats/Resto4Activity.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.widget.Button;
import android.widget.ImageView;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
Expand All @@ -17,6 +18,7 @@

public class Resto4Activity extends AppCompatActivity {
private Button makeReservationButton;
private ImageView backButton;

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down Expand Up @@ -57,5 +59,11 @@ protected void onCreate(Bundle savedInstanceState) {
intent.putExtra("restaurant", restaurant);
startActivity(intent);
});

ImageView backButton = findViewById(R.id.back_button_resto4); // Ensure correct ID
backButton.setOnClickListener(v -> {
Intent intent = new Intent(Resto4Activity.this, HomeScreenActivity.class);
startActivity(intent); // Added to start the HomeScreenActivity
});
}
}
8 changes: 8 additions & 0 deletions app/src/main/java/com/bscpe3g/sugboeats/Resto5Activity.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.widget.Button;
import android.widget.ImageView;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
Expand All @@ -18,6 +19,7 @@
public class Resto5Activity extends AppCompatActivity {

private Button makeReservationButton;
private ImageView backButton;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand Down Expand Up @@ -57,5 +59,11 @@ protected void onCreate(Bundle savedInstanceState) {
intent.putExtra("restaurant", restaurant);
startActivity(intent);
});

ImageView backButton = findViewById(R.id.back_button_resto5); // Ensure correct ID
backButton.setOnClickListener(v -> {
Intent intent = new Intent(Resto5Activity.this, HomeScreenActivity.class);
startActivity(intent); // Added to start the HomeScreenActivity
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ protected void onCreate(Bundle savedInstanceState) {
EdgeToEdge.enable(this);
setContentView(R.layout.activity_splash);
new Handler(Looper.getMainLooper()).postDelayed(() -> {
Intent mainIntent = new Intent(SplashActivity.this, Resto5Activity.class); // Replace HomeActivity with your actual main activity
Intent mainIntent = new Intent(SplashActivity.this, HomeScreenActivity.class); // Replace HomeActivity with your actual main activity
startActivity(mainIntent);
finish();
}, SPLASH_DISPLAY_LENGTH);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.bscpe3g.sugboeats;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;

import androidx.appcompat.app.AppCompatActivity;

public class SuccessfulBookingActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_successful_booking);

Button homeBtn = findViewById(R.id.return_home_button);

// Set a click listener on the return button
homeBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Navigate to another activity (e.g., go to ReturnActivity)
Intent intent = new Intent(SuccessfulBookingActivity.this, HomeScreenActivity.class);
startActivity(intent);
}
});
}
}
Binary file added app/src/main/res/drawable/call.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/email.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/homescreenresto1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/homescreenresto2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/homescreenresto3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/logo_transparent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/promo_one.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/promo_two.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/round_resto4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/rounded_corners.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?attr/colorControlHighlight">
<item>
<shape android:shape="rectangle">
<solid android:color="#FFFFFF"/> <!-- You can use any color you need -->
<corners android:radius="16dp"/> <!-- Adjust the radius as needed -->
</shape>
</item>
</ripple>
Binary file added app/src/main/res/drawable/rounded_resto1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/rounded_resto2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/rounded_resto3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/rounded_resto5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/success_booking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading