Commit 3e088b48 authored by jithushan.umaipalan's avatar jithushan.umaipalan

Initial commit

parents
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
# Default ignored files
/shelf/
/workspace.xml
Shakespeare's Booking
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<targetSelectedWithDropDown>
<Target>
<type value="QUICK_BOOT_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="$USER_HOME$/.android/avd/Pixel_2_API_33.avd" />
</Key>
</deviceKey>
</Target>
</targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2023-05-08T19:42:01.713634Z" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
/build
\ No newline at end of file
plugins {
id 'com.android.application'
}
android {
namespace 'com.project.shakespearesbooking'
compileSdk 33
defaultConfig {
applicationId "com.project.shakespearesbooking"
minSdk 26
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.8.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'androidx.sqlite:sqlite:2.2.0'
implementation 'com.google.code.gson:gson:2.8.9'
}
\ No newline at end of file
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
\ No newline at end of file
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.project.shakespearesbooking",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "1.0",
"outputFile": "app-release.apk"
}
],
"elementType": "File"
}
\ No newline at end of file
package com.project.shakespearesbooking;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.project.shakespearesbooking", appContext.getPackageName());
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.ShakespearesBooking"
tools:targetApi="31">
<activity
android:name=".SplashActivity"
android:exported="true"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".TicketsDetailsActivity"
android:exported="false"
android:screenOrientation="portrait"/>
<activity
android:name=".BookingSeatsActivity"
android:exported="false"
android:screenOrientation="portrait"/>
<activity
android:name=".ShowDetailsActivity"
android:exported="false"
android:screenOrientation="portrait"/>
<activity
android:name=".RegisterActivity"
android:exported="false"
android:screenOrientation="portrait"/>
<activity
android:name=".LoginActivity"
android:exported="false"
android:screenOrientation="portrait"/>
<activity
android:name=".MainActivity"
android:exported="false"
android:screenOrientation="portrait"/>
</application>
</manifest>
\ No newline at end of file
package com.project.shakespearesbooking.Adapters;
import android.annotation.SuppressLint;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.project.shakespearesbooking.R;
import com.project.shakespearesbooking.models.SeatModel;
import com.project.shakespearesbooking.models.TicketTypeModel;
import java.util.ArrayList;
public class SeatsRvAdapter extends RecyclerView.Adapter<SeatsRvAdapter.MyViewHolder> {
private ArrayList<TicketTypeModel> seats;
private Context context;
private TextView totalPrice;
final int[] tPrice = {0};
public ArrayList<SeatModel> selectedSeats = new ArrayList<>();
public SeatsRvAdapter(ArrayList<TicketTypeModel> seats, Context context, TextView totalPrice){
this.seats = seats;
this.totalPrice = totalPrice;
}
@NonNull
@Override
public SeatsRvAdapter.MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(parent.getContext())
.inflate(R.layout.seat_item, parent, false);
return new MyViewHolder(itemView);
}
@Override
public void onBindViewHolder(@NonNull SeatsRvAdapter.MyViewHolder holder, @SuppressLint("RecyclerView") int position) {
TicketTypeModel seat = seats.get(position);
SeatModel selectedSeat = new SeatModel();
holder.seatSelectTypeTv.setText(seat.type);
holder.seatSelectPriceTv.setText("£"+seat.price);
holder.seatSelectRemainingTv.setText(seat.count+"");
selectedSeat.seatType = seat.type;
selectedSeat.price = seat.price;
selectedSeat.seatCount = 0;
selectedSeats.add(selectedSeat);
holder.seatSelectIncreaseIv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
int count = Integer.parseInt(holder.seatSelectCountTv.getText().toString());
count++;
if (count >= 0 && count <= seat.count){
holder.seatSelectCountTv.setText(count+"");
selectedSeats.get(position).seatCount = count;
tPrice[0] += seat.price;
totalPrice.setText("£"+tPrice[0]);
}
}
});
holder.seatSelectDecreaseIv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
int count = Integer.parseInt(holder.seatSelectCountTv.getText().toString());
count--;
if (count >= 0 && count <= seat.count){
holder.seatSelectCountTv.setText(count+"");
selectedSeats.get(position).seatCount = count;
tPrice[0] -= seat.price;
totalPrice.setText("£"+tPrice[0]);
}
}
});
}
@Override
public int getItemCount() {
return seats.size();
}
public static class MyViewHolder extends RecyclerView.ViewHolder {
TextView seatSelectTypeTv, seatSelectRemainingTv, seatSelectPriceTv, seatSelectCountTv;
ImageView seatSelectDecreaseIv, seatSelectIncreaseIv;
public MyViewHolder(@NonNull View itemView) {
super(itemView);
seatSelectTypeTv = itemView.findViewById(R.id.seatSelectTypeTv);
seatSelectRemainingTv = itemView.findViewById(R.id.seatSelectRemainingTv);
seatSelectPriceTv = itemView.findViewById(R.id.seatSelectPriceTv);
seatSelectCountTv = itemView.findViewById(R.id.seatSelectCountTv);
seatSelectDecreaseIv = itemView.findViewById(R.id.seatSelectDecreaseIv);
seatSelectIncreaseIv = itemView.findViewById(R.id.seatSelectIncreaseIv);
}
}
}
package com.project.shakespearesbooking.Adapters;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.project.shakespearesbooking.R;
import com.project.shakespearesbooking.ShowDetailsActivity;
import com.project.shakespearesbooking.models.ShowModel;
import com.squareup.picasso.Picasso;
import java.util.ArrayList;
public class ShowsRvAdapter extends RecyclerView.Adapter<ShowsRvAdapter.MyViewHolder> {
private ArrayList<ShowModel> shows;
private Context context;
public ShowsRvAdapter(ArrayList<ShowModel> shows, Context context){
this.shows = shows;
this.context = context;
}
@NonNull
@Override
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(parent.getContext())
.inflate(R.layout.show_item, parent, false);
return new MyViewHolder(itemView);
}
@Override
public void onBindViewHolder(@NonNull MyViewHolder holder, @SuppressLint("RecyclerView") int position) {
ShowModel show = shows.get(position);
holder.nameTv.setText(show.showTitle);
Picasso.get().load(show.img).into(holder.showIv);
holder.showIv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(context, ShowDetailsActivity.class);
intent.putExtra("showIndex", position);
context.startActivity(intent);
}
});
}
@Override
public int getItemCount() {
return shows.size();
}
public static class MyViewHolder extends RecyclerView.ViewHolder {
public TextView nameTv;
public ImageView showIv;
public MyViewHolder(@NonNull View itemView) {
super(itemView);
nameTv = itemView.findViewById(R.id.showItemTv);
showIv = itemView.findViewById(R.id.showItemIv);
}
}
}
package com.project.shakespearesbooking.Adapters;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.RecyclerView;
import com.project.shakespearesbooking.R;
import com.project.shakespearesbooking.TicketsDetailsActivity;
import com.project.shakespearesbooking.models.SeatModel;
import com.project.shakespearesbooking.models.TicketModel;
import com.project.shakespearesbooking.models.TicketTypeModel;
import com.squareup.picasso.Picasso;
import java.util.ArrayList;
public class TicketRvAdapter extends RecyclerView.Adapter<TicketRvAdapter.MyViewHolder> {
ArrayList<TicketModel> tickets;
Context context;
public TicketRvAdapter(ArrayList<TicketModel> tickets, Context context){
this.tickets = tickets;
this.context = context;
}
@NonNull
@Override
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(parent.getContext())
.inflate(R.layout.ticket_item, parent, false);
return new MyViewHolder(itemView);
}
@Override
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
TicketModel ticket = tickets.get(position);
holder.ticketTitleTv.setText(ticket.showModel.showTitle);
holder.ticketDateTv.setText(ticket.showModel.date);
holder.ticketTimeTv.setText(ticket.showModel.dayTime);
holder.ticketRefTv.setText(ticket.RefNo+"");
StringBuilder seats = new StringBuilder();
for (SeatModel seat : ticket.seatB ){
seats.append(seat.seatType).append(": ").append(seat.seatCount).append("\n");
}
holder.ticketSeatsTv.setText(seats.toString());
Picasso.get().load(ticket.showModel.img).into(holder.ticketIv);
holder.ticketItemCl.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent bookingDetails = new Intent(context, TicketsDetailsActivity.class);
bookingDetails.putExtra("ticketId", ticket.id);
context.startActivity(bookingDetails);
}
});
}
@Override
public int getItemCount() {
return tickets.size();
}
public static class MyViewHolder extends RecyclerView.ViewHolder {
public TextView ticketTitleTv, ticketDateTv, ticketTimeTv, ticketSeatsTv, ticketRefTv;
public ConstraintLayout ticketItemCl;
public ImageView ticketIv;
public MyViewHolder(@NonNull View itemView) {
super(itemView);
ticketTitleTv = itemView.findViewById(R.id.ticketTitleTv);
ticketDateTv = itemView.findViewById(R.id.ticketDateTv);
ticketTimeTv = itemView.findViewById(R.id.ticketTimeTv);
ticketSeatsTv = itemView.findViewById(R.id.ticketSeatsTv);
ticketRefTv = itemView.findViewById(R.id.ticketRefTv);
ticketIv = itemView.findViewById(R.id.ticketIv);
ticketItemCl = itemView.findViewById(R.id.ticketItemCl);
}
}
}
package com.project.shakespearesbooking;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.annotation.SuppressLint;
import android.app.Dialog;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.material.textfield.TextInputEditText;
import com.google.android.material.textfield.TextInputLayout;
import com.project.shakespearesbooking.Adapters.SeatsRvAdapter;
import com.project.shakespearesbooking.Database.MyDatabaseHelper;
import com.project.shakespearesbooking.TestData.ShowData;
import com.project.shakespearesbooking.models.SeatModel;
import com.project.shakespearesbooking.models.ShowModel;
import com.project.shakespearesbooking.models.TicketModel;
import com.project.shakespearesbooking.models.TicketTypeModel;
import java.util.ArrayList;
public class BookingSeatsActivity extends AppCompatActivity {
private RecyclerView seatsRv;
private Button bookBtn;
private ImageView backIv;
private TextView totalPrice;
private SeatsRvAdapter seatsRvAdapter;
ShowModel currentShow;
MyDatabaseHelper dbHelper;
@SuppressLint("MissingInflatedId")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_booking_seats);
getSupportActionBar().hide();
backIv = findViewById(R.id.seatBookBackIv);
seatsRv = findViewById(R.id.seatBookRv);
totalPrice = findViewById(R.id.seatBookTotalTv);
bookBtn = findViewById(R.id.seatBookBtn);
dbHelper = new MyDatabaseHelper(this);
Intent intent = getIntent();
int showPosition = intent.getExtras().getInt("showIndex");
currentShow =dbHelper.getShow(this,showPosition);
ArrayList<TicketTypeModel> seats = currentShow.ticketTypes;
seatsRvAdapter = new SeatsRvAdapter(seats, this, totalPrice);
seatsRv.setLayoutManager(new LinearLayoutManager(this));
seatsRv.setAdapter(seatsRvAdapter);
backIv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
bookBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
int totalCount = 0;
for (SeatModel tm : seatsRvAdapter.selectedSeats){
totalCount += tm.seatCount;
}
if (totalCount > 0) {
openNoteDialog();
}else {
Toast.makeText(BookingSeatsActivity.this, "Please add your seats first.", Toast.LENGTH_SHORT).show();
}
}
});
}
private void openNoteDialog() {
Dialog dialog = new Dialog(this);
dialog.setContentView(R.layout.note_booking);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
dialog.getWindow().setGravity(Gravity.CENTER);
dialog.show();
TextInputEditText textInputLayout = dialog.findViewById(R.id.alertNoteEt);
Button cntBtn = dialog.findViewById(R.id.alertNoteBtn);
cntBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String noteTv = textInputLayout.getText().toString();
if (!noteTv.isEmpty()){
openNameDialog(noteTv);
dialog.dismiss();
}else {
Toast.makeText(BookingSeatsActivity.this, "Note can't be empty!", Toast.LENGTH_SHORT).show();
}
}
});
}
private void openNameDialog(String note) {
Dialog dialog = new Dialog(this);
dialog.setContentView(R.layout.name_booking);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
dialog.getWindow().setGravity(Gravity.CENTER);
dialog.setCanceledOnTouchOutside(false);
dialog.show();
SharedPreferences sharedPreferences = getSharedPreferences("login", MODE_PRIVATE);
String email = sharedPreferences.getString("email", "");
TextInputEditText textInputLayout = dialog.findViewById(R.id.alertNameEt);
Button finishBtn = dialog.findViewById(R.id.alertNameBtn);
finishBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String name = textInputLayout.getText().toString();
if (!name.isEmpty()) {
TicketModel ticketInsert = new TicketModel();
ticketInsert.note = note;
ticketInsert.userId = email;
ticketInsert.fullName = name;
ticketInsert.showModel = currentShow;
ticketInsert.seatB = seatsRvAdapter.selectedSeats;
dbHelper.insertTicket(ticketInsert);
dialog.dismiss();
openSuccessMessage();
}else{
Toast.makeText(BookingSeatsActivity.this, "Name can't be empty!", Toast.LENGTH_SHORT).show();
}
}
});
}
private void openSuccessMessage() {
Dialog dialog = new Dialog(this);
dialog.setContentView(R.layout.success_booking);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
dialog.getWindow().setGravity(Gravity.CENTER);
dialog.setCanceledOnTouchOutside(false);
dialog.show();
Button closeBtn = dialog.findViewById(R.id.successBtn);
closeBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
dialog.dismiss();
Intent intetMain = new Intent(BookingSeatsActivity.this, MainActivity.class);
startActivity(intetMain);
finishAffinity();
}
});
}
}
\ No newline at end of file
package com.project.shakespearesbooking.Database;
import android.annotation.SuppressLint;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.text.TextUtils;
import android.util.Log;
import android.widget.Toast;
import com.project.shakespearesbooking.models.SeatModel;
import com.project.shakespearesbooking.models.ShowModel;
import com.project.shakespearesbooking.models.TicketModel;
import com.project.shakespearesbooking.models.TicketTypeModel;
import com.project.shakespearesbooking.models.UserModel;
import java.util.ArrayList;
import java.util.List;
public class MyDatabaseHelper extends SQLiteOpenHelper {
private static final String DATABASE_NAME = "my_database";
private static final int DATABASE_VERSION = 1;
Context context;
public MyDatabaseHelper(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
// Create the necessary tables
db.execSQL("CREATE TABLE Show (" +
"id INTEGER PRIMARY KEY," +
"showTitle TEXT," +
"dayTime TEXT," +
"img TEXT," +
"date TEXT," +
"address TEXT," +
"confirmation TEXT," +
"accRestriction TEXT" +
")");
db.execSQL("CREATE TABLE TicketType (" +
"id INTEGER PRIMARY KEY," +
"show_id INTEGER," +
"type TEXT," +
"count INTEGER," +
"price INTEGER," +
"FOREIGN KEY (show_id) REFERENCES Show(id)" +
")");
db.execSQL("CREATE TABLE Ticket (" +
"id INTEGER PRIMARY KEY," +
"show_id INTEGER," +
"user_id TEXT," +
"refNo LONG,"+
"note LONG,"+
"full_name LONG,"+
"FOREIGN KEY (show_id) REFERENCES Show(id)," +
"FOREIGN KEY (user_id) REFERENCES User(email)" +
")");
db.execSQL("CREATE TABLE Seat (" +
"id INTEGER PRIMARY KEY," +
"ticket_id INTEGER,"+
"seatType TEXT," +
"seatCount INTEGER," +
"price INTEGER," +
"FOREIGN KEY (ticket_id) REFERENCES Ticket(id)" +
")");
db.execSQL("CREATE TABLE User (" +
"email TEXT PRIMARY KEY," +
"username TEXT,"+
"password TEXT" +
")");
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
// Handle any necessary database upgrades
}
@SuppressLint("Range")
public ArrayList<ShowModel> getAllShows(Context context) {
ArrayList<ShowModel> shows = new ArrayList<>();
SQLiteDatabase db = this.getReadableDatabase();
Cursor cursor = db.rawQuery("SELECT * FROM Show", null);
if (cursor.moveToFirst()) {
do {
ShowModel show = new ShowModel();
show.id = cursor.getInt(cursor.getColumnIndex("id"));
show.showTitle = cursor.getString(cursor.getColumnIndex("showTitle"));
show.dayTime = cursor.getString(cursor.getColumnIndex("dayTime"));
show.img = cursor.getString(cursor.getColumnIndex("img"));
show.date = cursor.getString(cursor.getColumnIndex("date"));
show.address = cursor.getString(cursor.getColumnIndex("address"));
show.confirmation = cursor.getString(cursor.getColumnIndex("confirmation"));
String accRestrictionString = cursor.getString(cursor.getColumnIndex("accRestriction"));
if (accRestrictionString != null) {
String[] accRestrictions = accRestrictionString.split(",");
for (String accRestriction : accRestrictions) {
show.accRestriction.add(accRestriction);
}
}
// Retrieve ticket types for this show
int showId = cursor.getInt(cursor.getColumnIndex("id"));
Cursor ticketTypeCursor = db.rawQuery("SELECT * FROM TicketType WHERE show_id=?", new String[]{String.valueOf(showId)});
if (ticketTypeCursor.moveToFirst()) {
do {
TicketTypeModel ticketType = new TicketTypeModel();
ticketType.type = ticketTypeCursor.getString(ticketTypeCursor.getColumnIndex("type"));
ticketType.count = ticketTypeCursor.getInt(ticketTypeCursor.getColumnIndex("count"));
ticketType.price = ticketTypeCursor.getInt(ticketTypeCursor.getColumnIndex("price"));
show.ticketTypes.add(ticketType);
} while (ticketTypeCursor.moveToNext());
}
ticketTypeCursor.close();
shows.add(show);
} while (cursor.moveToNext());
}
cursor.close();
db.close();
return shows;
}
@SuppressLint("Range")
public ArrayList<ShowModel> getSearchShows(Context context,String key) {
ArrayList<ShowModel> shows = new ArrayList<>();
SQLiteDatabase db = this.getReadableDatabase();
Cursor cursor = db.rawQuery("SELECT * FROM Show WHERE showTitle LIKE ?", new String[]{String.valueOf("%"+key+"%")});
if (cursor.moveToFirst()) {
do {
ShowModel show = new ShowModel();
show.id = cursor.getInt(cursor.getColumnIndex("id"));
show.showTitle = cursor.getString(cursor.getColumnIndex("showTitle"));
show.dayTime = cursor.getString(cursor.getColumnIndex("dayTime"));
show.img = cursor.getString(cursor.getColumnIndex("img"));
show.date = cursor.getString(cursor.getColumnIndex("date"));
show.address = cursor.getString(cursor.getColumnIndex("address"));
show.confirmation = cursor.getString(cursor.getColumnIndex("confirmation"));
String accRestrictionString = cursor.getString(cursor.getColumnIndex("accRestriction"));
if (accRestrictionString != null) {
String[] accRestrictions = accRestrictionString.split(",");
for (String accRestriction : accRestrictions) {
show.accRestriction.add(accRestriction);
}
}
// Retrieve ticket types for this show
int showId = cursor.getInt(cursor.getColumnIndex("id"));
Cursor ticketTypeCursor = db.rawQuery("SELECT * FROM TicketType WHERE show_id=?", new String[]{String.valueOf(showId)});
if (ticketTypeCursor.moveToFirst()) {
do {
TicketTypeModel ticketType = new TicketTypeModel();
ticketType.type = ticketTypeCursor.getString(ticketTypeCursor.getColumnIndex("type"));
ticketType.count = ticketTypeCursor.getInt(ticketTypeCursor.getColumnIndex("count"));
ticketType.price = ticketTypeCursor.getInt(ticketTypeCursor.getColumnIndex("price"));
show.ticketTypes.add(ticketType);
} while (ticketTypeCursor.moveToNext());
}
ticketTypeCursor.close();
shows.add(show);
} while (cursor.moveToNext());
}
cursor.close();
db.close();
return shows;
}
@SuppressLint("Range")
public ArrayList<TicketModel> getAllTickets(Context context, String userid) {
ArrayList<TicketModel> tickets = new ArrayList<>();
SQLiteDatabase db = this.getReadableDatabase();
Cursor cursor = db.rawQuery("SELECT * FROM Ticket WHERE user_id = ? ORDER BY id DESC", new String[]{String.valueOf(userid)});
if (cursor.moveToFirst()) {
do {
TicketModel ticket = new TicketModel();
ticket.id = cursor.getInt(cursor.getColumnIndex("id"));
int show_id = cursor.getInt(cursor.getColumnIndex("show_id"));
ticket.note = cursor.getString(cursor.getColumnIndex("note"));
ticket.fullName = cursor.getString(cursor.getColumnIndex("full_name"));
ticket.RefNo = cursor.getLong(cursor.getColumnIndex("refNo"));
ticket.showModel = getShow(context,show_id);
ticket.seatB = getTicketSeats(ticket.id);
tickets.add(ticket);
} while (cursor.moveToNext());
}
cursor.close();
db.close();
return tickets;
}
@SuppressLint("Range")
public ArrayList<SeatModel> getTicketSeats(int ticket_id){
ArrayList<SeatModel> bookedSeats = new ArrayList<>();
SQLiteDatabase db = this.getReadableDatabase();
Cursor seatCursor = db.rawQuery("SELECT * FROM Seat WHERE ticket_id=?", new String[]{String.valueOf(ticket_id)});
if (seatCursor.moveToFirst()) {
do {
SeatModel seat = new SeatModel();
seat.id = seatCursor.getInt(seatCursor.getColumnIndex("id"));
seat.seatCount = seatCursor.getInt(seatCursor.getColumnIndex("seatCount"));
seat.seatType = seatCursor.getString(seatCursor.getColumnIndex("seatType"));
seat.price = seatCursor.getInt(seatCursor.getColumnIndex("price"));
bookedSeats.add(seat);
} while (seatCursor.moveToNext());
}
seatCursor.close();
db.close();
return bookedSeats;
}
@SuppressLint("Range")
public ShowModel getShow(Context context, int sId) {
ShowModel show = new ShowModel();
SQLiteDatabase db = this.getReadableDatabase();
Cursor cursor = db.rawQuery("SELECT * FROM Show WHERE id = ?", new String[]{String.valueOf(sId)});
if (cursor.moveToFirst()) {
do {
show.id = cursor.getInt(cursor.getColumnIndex("id"));
show.showTitle = cursor.getString(cursor.getColumnIndex("showTitle"));
show.dayTime = cursor.getString(cursor.getColumnIndex("dayTime"));
show.img = cursor.getString(cursor.getColumnIndex("img"));
show.date = cursor.getString(cursor.getColumnIndex("date"));
show.address = cursor.getString(cursor.getColumnIndex("address"));
show.confirmation = cursor.getString(cursor.getColumnIndex("confirmation"));
String accRestrictionString = cursor.getString(cursor.getColumnIndex("accRestriction"));
if (accRestrictionString != null) {
String[] accRestrictions = accRestrictionString.split(",");
for (String accRestriction : accRestrictions) {
show.accRestriction.add(accRestriction);
}
}
// Retrieve ticket types for this show
int showId = cursor.getInt(cursor.getColumnIndex("id"));
Cursor ticketTypeCursor = db.rawQuery("SELECT * FROM TicketType WHERE show_id=?", new String[]{String.valueOf(showId)});
if (ticketTypeCursor.moveToFirst()) {
do {
TicketTypeModel ticketType = new TicketTypeModel();
ticketType.id = ticketTypeCursor.getInt(ticketTypeCursor.getColumnIndex("id"));
ticketType.type = ticketTypeCursor.getString(ticketTypeCursor.getColumnIndex("type"));
ticketType.count = ticketTypeCursor.getInt(ticketTypeCursor.getColumnIndex("count"));
ticketType.price = ticketTypeCursor.getInt(ticketTypeCursor.getColumnIndex("price"));
show.ticketTypes.add(ticketType);
} while (ticketTypeCursor.moveToNext());
}
ticketTypeCursor.close();
} while (cursor.moveToNext());
}
cursor.close();
db.close();
return show;
}
@SuppressLint("Range")
public ShowModel getShow(Context context, int sId, SQLiteDatabase db) {
ShowModel show = new ShowModel();
Cursor cursor = db.rawQuery("SELECT * FROM Show WHERE id = ?", new String[]{String.valueOf(sId)});
if (cursor.moveToFirst()) {
do {
show.id = cursor.getInt(cursor.getColumnIndex("id"));
show.showTitle = cursor.getString(cursor.getColumnIndex("showTitle"));
show.dayTime = cursor.getString(cursor.getColumnIndex("dayTime"));
show.img = cursor.getString(cursor.getColumnIndex("img"));
show.date = cursor.getString(cursor.getColumnIndex("date"));
show.address = cursor.getString(cursor.getColumnIndex("address"));
show.confirmation = cursor.getString(cursor.getColumnIndex("confirmation"));
String accRestrictionString = cursor.getString(cursor.getColumnIndex("accRestriction"));
if (accRestrictionString != null) {
String[] accRestrictions = accRestrictionString.split(",");
for (String accRestriction : accRestrictions) {
show.accRestriction.add(accRestriction);
}
}
// Retrieve ticket types for this show
int showId = cursor.getInt(cursor.getColumnIndex("id"));
Cursor ticketTypeCursor = db.rawQuery("SELECT * FROM TicketType WHERE show_id=?", new String[]{String.valueOf(showId)});
if (ticketTypeCursor.moveToFirst()) {
do {
TicketTypeModel ticketType = new TicketTypeModel();
ticketType.id = ticketTypeCursor.getInt(ticketTypeCursor.getColumnIndex("id"));
ticketType.type = ticketTypeCursor.getString(ticketTypeCursor.getColumnIndex("type"));
ticketType.count = ticketTypeCursor.getInt(ticketTypeCursor.getColumnIndex("count"));
ticketType.price = ticketTypeCursor.getInt(ticketTypeCursor.getColumnIndex("price"));
show.ticketTypes.add(ticketType);
} while (ticketTypeCursor.moveToNext());
}
ticketTypeCursor.close();
} while (cursor.moveToNext());
}
cursor.close();
return show;
}
@SuppressLint("Range")
public Boolean isLogin(Context context, UserModel user) {
Boolean userLog = false;
SQLiteDatabase db = this.getReadableDatabase();
Cursor cursor = db.rawQuery("SELECT * FROM User WHERE email = ? AND password = ?", new String[]{String.valueOf(user.email), String.valueOf(user.password)});
if (cursor.moveToFirst()) {
user.email = cursor.getString(cursor.getColumnIndex("email"));
user.password = cursor.getString(cursor.getColumnIndex("username"));
user.username = cursor.getString(cursor.getColumnIndex("password"));
userLog = true;
}
cursor.close();
db.close();
return userLog;
}
@SuppressLint("Range")
public UserModel getUser(Context context, String email) {
UserModel user = new UserModel();
SQLiteDatabase db = this.getReadableDatabase();
Cursor cursor = db.rawQuery("SELECT * FROM User WHERE email = ?", new String[]{String.valueOf(email)});
if (cursor.moveToFirst()) {
user.email = cursor.getString(cursor.getColumnIndex("email"));
user.password = cursor.getString(cursor.getColumnIndex("username"));
user.username = cursor.getString(cursor.getColumnIndex("password"));
}
cursor.close();
db.close();
return user;
}
@SuppressLint("Range")
public TicketModel getTicket(Context context, int tId) {
TicketModel ticket = new TicketModel();
SQLiteDatabase db = this.getReadableDatabase();
Cursor cursor = db.rawQuery("SELECT * FROM Ticket WHERE id = ?", new String[]{String.valueOf(tId)});
if (cursor.moveToFirst()) {
do {
ticket.id = cursor.getInt(cursor.getColumnIndex("id"));
ticket.note = cursor.getString(cursor.getColumnIndex("note"));
ticket.fullName = cursor.getString(cursor.getColumnIndex("full_name"));
ticket.RefNo = cursor.getLong(cursor.getColumnIndex("refNo"));
int showId = cursor.getInt(cursor.getColumnIndex("show_id"));
ticket.showModel = getShow(context, showId, db);
Cursor ticketTypeCursor = db.rawQuery("SELECT * FROM Seat WHERE ticket_id=?", new String[]{String.valueOf(ticket.id)});
if (ticketTypeCursor.moveToFirst()) {
do {
SeatModel seat = new SeatModel();
seat.id = ticketTypeCursor.getInt(ticketTypeCursor.getColumnIndex("id"));
seat.seatType = ticketTypeCursor.getString(ticketTypeCursor.getColumnIndex("seatType"));
seat.seatCount = ticketTypeCursor.getInt(ticketTypeCursor.getColumnIndex("seatCount"));
seat.price = ticketTypeCursor.getInt(ticketTypeCursor.getColumnIndex("price"));
ticket.seatB.add(seat);
} while (ticketTypeCursor.moveToNext());
}
ticketTypeCursor.close();
} while (cursor.moveToNext());
}
cursor.close();
db.close();
return ticket;
}
public void insertShowData(ShowModel showModel) {
SQLiteDatabase db = getWritableDatabase();
ContentValues values = new ContentValues();
values.put("showTitle", showModel.showTitle);
values.put("dayTime", showModel.dayTime);
values.put("img", showModel.img);
values.put("date", showModel.date);
values.put("address", showModel.address);
values.put("confirmation", showModel.confirmation);
values.put("accRestriction", TextUtils.join(",", showModel.accRestriction));
long newRowId = db.insert("Show", null, values);
for (TicketTypeModel ticketType : showModel.ticketTypes) {
ContentValues ticketValues = new ContentValues();
ticketValues.put("show_id", newRowId);
ticketValues.put("type", ticketType.type);
ticketValues.put("count", ticketType.count);
ticketValues.put("price", ticketType.price);
db.insertOrThrow("TicketType", null, ticketValues);
}
db.close();
}
public void insertUser(UserModel user) {
SQLiteDatabase db = getWritableDatabase();
ContentValues values = new ContentValues();
values.put("email", user.email);
values.put("username", user.username);
values.put("password", user.password);
db.insert("User", null, values);
db.close();
}
public void insertTicket(TicketModel ticket){
SQLiteDatabase db = getWritableDatabase();
ContentValues values = new ContentValues();
values.put("show_id", ticket.showModel.id);
values.put("refNo", System.currentTimeMillis());
values.put("note", ticket.note);
values.put("user_id", ticket.userId);
values.put("full_name", ticket.fullName);
long newRowId = db.insert("Ticket", null, values);
for (int i = 0; i<ticket.seatB.size(); i++){
SeatModel seat = ticket.seatB.get(i);
if (seat.seatCount > 0) {
setSeatCount(ticket.showModel.ticketTypes.get(i).id, (ticket.showModel.ticketTypes.get(i).count - seat.seatCount), db);
ContentValues seatValues = new ContentValues();
seatValues.put("seatType", seat.seatType);
seatValues.put("seatCount", seat.seatCount);
seatValues.put("price", seat.price);
seatValues.put("ticket_id", newRowId);
db.insert("Seat", null, seatValues);
}
}
db.close();
}
public void setSeatCount(int seatId, int count, SQLiteDatabase db){
db.execSQL("UPDATE TicketType SET count = ? WHERE id = ?", new String[]{String.valueOf(count), String.valueOf(seatId)});
}
public void deleteTicket(TicketModel ticket, Context context){
SQLiteDatabase db = getWritableDatabase();
for (TicketTypeModel st : ticket.showModel.ticketTypes){
for (SeatModel s : ticket.seatB){
if (s.seatType.equals(st.type)){
setSeatCount(st.id, (st.count + s.seatCount), db );
}
}
}
db.delete("Ticket","id = ?", new String[]{String.valueOf(ticket.id)});
db.delete("Seat","ticket_id = ?", new String[]{String.valueOf(ticket.id)});
db.close();
}
}
package com.project.shakespearesbooking;
import android.annotation.SuppressLint;
import android.content.ContentValues;
import android.content.Context;
import android.content.SharedPreferences;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.preference.PreferenceManager;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
import android.widget.Toast;
import com.google.gson.Gson;
import com.project.shakespearesbooking.Adapters.ShowsRvAdapter;
import com.project.shakespearesbooking.Database.MyDatabaseHelper;
import com.project.shakespearesbooking.TestData.ShowData;
import com.project.shakespearesbooking.models.ShowModel;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.List;
public class HomeFragment extends Fragment {
private RecyclerView showRv;
private ShowsRvAdapter showRvAdapter;
AutoCompleteTextView searchEt;
MyDatabaseHelper dbHelper;
@SuppressLint("MissingInflatedId")
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootview = inflater.inflate(R.layout.fragment_home, container, false);
searchEt = rootview.findViewById(R.id.searchEt);
dbHelper = new MyDatabaseHelper(getContext());
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getContext());
boolean isFirstTime = sharedPreferences.getBoolean("is_first_time", true);
if (isFirstTime) {
insertIniValues(getContext());
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean("is_first_time", false);
editor.apply();
}
ArrayList<ShowModel> shows = dbHelper.getAllShows(getContext());
showRvAdapter = new ShowsRvAdapter(shows, getActivity());
List<String> searchValues = new ArrayList<>();
for (ShowModel show : shows){
searchValues.add(show.showTitle);
}
ArrayAdapter<String> adapter = new ArrayAdapter<String>(getContext(), android.R.layout.simple_dropdown_item_1line, searchValues);
searchEt.setAdapter(adapter);
showRv = rootview.findViewById(R.id.showsRv);
showRv.setLayoutManager(new GridLayoutManager(getActivity(), 2));
showRv.setAdapter(showRvAdapter);
searchEt.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
String searchText = s.toString();
ArrayList<ShowModel> searchShows = dbHelper.getSearchShows(getContext(), searchText);
showRvAdapter = new ShowsRvAdapter(searchShows, getActivity());
showRv.setAdapter(showRvAdapter);
}
@Override
public void afterTextChanged(Editable s) {
}
});
return rootview;
}
private void insertIniValues(Context context){
ShowData sd = new ShowData();
sd.addData();
for (ShowModel s : sd.shows){
dbHelper.insertShowData(s);
}
}
}
\ No newline at end of file
package com.project.shakespearesbooking;
import androidx.appcompat.app.AppCompatActivity;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.material.button.MaterialButton;
import com.google.android.material.textfield.TextInputEditText;
import com.project.shakespearesbooking.Database.MyDatabaseHelper;
import com.project.shakespearesbooking.models.UserModel;
public class LoginActivity extends AppCompatActivity {
TextView regTv;
TextInputEditText emailEt, passwordEt;
MaterialButton logBtn;
@SuppressLint("MissingInflatedId")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
getSupportActionBar().hide();
regTv = findViewById(R.id.registerTv);
logBtn = findViewById(R.id.loginBtn);
emailEt = findViewById(R.id.emailEt);
passwordEt = findViewById(R.id.passwordEt);
logBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
UserModel user = new UserModel();
user.email = emailEt.getText().toString();
user.password = passwordEt.getText().toString();
if(!TextUtils.isEmpty(user.email) && !TextUtils.isEmpty(user.password)){
MyDatabaseHelper dbHelper = new MyDatabaseHelper(getApplicationContext());
if (dbHelper.isLogin(getApplicationContext(), user)){
SharedPreferences sharedPreferences = getSharedPreferences("login", MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean("isLogin", true); // Set the value to true
editor.putString("email", user.email); // Set the value to true
editor.apply();
Intent homeIntent = new Intent(LoginActivity.this, MainActivity.class);
startActivity(homeIntent);
finish();
Toast.makeText(LoginActivity.this, "Successfully Logged!", Toast.LENGTH_SHORT).show();
}else {
Toast.makeText(LoginActivity.this, "Your entered wrong credential.", Toast.LENGTH_SHORT).show();
}
} else {
Toast.makeText(LoginActivity.this, "Fields can't be empty!", Toast.LENGTH_SHORT).show();
}
}
});
regTv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent regIntent = new Intent(LoginActivity.this, RegisterActivity.class);
startActivity(regIntent);
finish();
}
});
}
}
\ No newline at end of file
package com.project.shakespearesbooking;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.project.shakespearesbooking.Database.MyDatabaseHelper;
public class MainActivity extends AppCompatActivity {
// ActivityMainBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
getSupportActionBar().hide();
replaceFragment(new HomeFragment());
BottomNavigationView bnv = findViewById(R.id.bottomNavigationView);
bnv.setOnItemSelectedListener(item -> {
switch (item.getItemId()){
case R.id.home:
replaceFragment(new HomeFragment());
break;
case R.id.ticket:
replaceFragment(new TicketFragment());
break;
case R.id.profile:
replaceFragment(new ProfileFragment());
}
return true;
});
MyDatabaseHelper dbHelper = new MyDatabaseHelper(this);
SQLiteDatabase db = dbHelper.getWritableDatabase();
}
private void replaceFragment(Fragment fragment){
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.replace(R.id.frameLayout, fragment);
fragmentTransaction.commit();
}
}
\ No newline at end of file
package com.project.shakespearesbooking;
import static android.content.Context.MODE_PRIVATE;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import com.project.shakespearesbooking.Database.MyDatabaseHelper;
import com.project.shakespearesbooking.models.UserModel;
public class ProfileFragment extends Fragment {
TextView proUserTv, proEmailTv;
Button signOutBtn;
@SuppressLint("MissingInflatedId")
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View root = inflater.inflate(R.layout.fragment_profile, container, false);
proUserTv = root.findViewById(R.id.proUserTv);
proEmailTv = root.findViewById(R.id.proEmailTv);
signOutBtn = root.findViewById(R.id.signOutBtn);
SharedPreferences sharedPreferences = getActivity().getSharedPreferences("login", MODE_PRIVATE);
String email = sharedPreferences.getString("email", "");
MyDatabaseHelper db = new MyDatabaseHelper(getContext());
UserModel user = db.getUser(getContext(), email);
proUserTv.setText(user.username);
proEmailTv.setText(user.email);
signOutBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
SharedPreferences sharedPreferences = getActivity().getSharedPreferences("login", MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean("isLogin", false); // Set the value to false
editor.putString("email", ""); // Set the value to false
editor.apply();
Intent loginIntent = new Intent(getActivity(), LoginActivity.class);
startActivity(loginIntent);
getActivity().finishAffinity();
}
});
return root;
}
}
\ No newline at end of file
package com.project.shakespearesbooking;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.material.button.MaterialButton;
import com.google.android.material.textfield.TextInputEditText;
import com.project.shakespearesbooking.Database.MyDatabaseHelper;
import com.project.shakespearesbooking.models.UserModel;
public class RegisterActivity extends AppCompatActivity {
TextView logTv;
MaterialButton regBtn;
TextInputEditText regUsernameEt, regEmailET, regPasswordEt;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_register);
getSupportActionBar().hide();
logTv = findViewById(R.id.loginTv);
regBtn = findViewById(R.id.registerBtn);
regUsernameEt = findViewById(R.id.regUsernameEt);
regEmailET = findViewById(R.id.regEmailET);
regPasswordEt = findViewById(R.id.regPasswordEt);
regBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
UserModel user = new UserModel();
user.username = regUsernameEt.getText().toString();
user.email = regEmailET.getText().toString();
user.password = regPasswordEt.getText().toString();
if(!TextUtils.isEmpty(user.username) && !TextUtils.isEmpty(user.email) && !TextUtils.isEmpty(user.password)){
MyDatabaseHelper dbHelper = new MyDatabaseHelper(getApplicationContext());
dbHelper.insertUser(user);
SharedPreferences sharedPreferences = getSharedPreferences("login", MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean("isLogin", true); // Set the value to true
editor.putString("email", user.email); // Set the value to true
editor.apply();
Intent homeIntent = new Intent(RegisterActivity.this, MainActivity.class);
startActivity(homeIntent);
finish();
Toast.makeText(RegisterActivity.this, "Successfully registered!", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(RegisterActivity.this, "Fields can't be empty!", Toast.LENGTH_SHORT).show();
}
}
});
logTv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent regIntent = new Intent(RegisterActivity.this, LoginActivity.class);
startActivity(regIntent);
finish();
}
});
}
@Override
public void onBackPressed() {
super.onBackPressed();
Intent regIntent = new Intent(RegisterActivity.this, LoginActivity.class);
startActivity(regIntent);
finish();
}
}
\ No newline at end of file
package com.project.shakespearesbooking;
import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout;
import android.annotation.SuppressLint;
import android.app.ActionBar;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.project.shakespearesbooking.Adapters.ShowsRvAdapter;
import com.project.shakespearesbooking.Database.MyDatabaseHelper;
import com.project.shakespearesbooking.models.ShowModel;
import com.project.shakespearesbooking.models.TicketTypeModel;
import com.squareup.picasso.Picasso;
import java.util.Objects;
public class ShowDetailsActivity extends AppCompatActivity {
Button bookBtn;
TextView showDetailsTitleTv,showDetailsTimeTv,showDetailsDateTv,showDetailsAddressTv,showDetailsSeatsTv,showDetailsAccTv;
ImageView backIv,showDetailsIv;
CheckBox showDetailsCb;
MyDatabaseHelper dbHelper;
Boolean isConfirm = false;
@SuppressLint("MissingInflatedId")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_show_details);
getSupportActionBar().hide();
Intent reIntent = getIntent();
int showPosition = reIntent.getExtras().getInt("showIndex");
dbHelper = new MyDatabaseHelper(this);
ShowModel showModel = dbHelper.getShow(this, showPosition+1);
bookBtn = findViewById(R.id.showDetailsBookBtn);
backIv = findViewById(R.id.showDetailsBackIv);
showDetailsTitleTv = findViewById(R.id.showDetailsTitleTv);
showDetailsTimeTv = findViewById(R.id.showDetailsTimeTv);
showDetailsDateTv = findViewById(R.id.showDetailsDateTv);
showDetailsAddressTv = findViewById(R.id.showDetailsAddressTv);
showDetailsSeatsTv = findViewById(R.id.showDetailsSeatsTv);
showDetailsAccTv = findViewById(R.id.showDetailsAccTv);
showDetailsIv = findViewById(R.id.showDetailsIv);
showDetailsCb = findViewById(R.id.showDetailsCb);
showDetailsTitleTv.setText(showModel.showTitle);
showDetailsTimeTv.setText(showModel.dayTime);
showDetailsDateTv.setText(showModel.date);
showDetailsAddressTv.setText(showModel.address);
Picasso.get().load(showModel.img).into(showDetailsIv);
String seats = "";
for (TicketTypeModel seat: showModel.ticketTypes){
seats+=seat.type+": "+seat.count+"\n";
}
showDetailsSeatsTv.setText(seats);
String accs = "";
for (String acc : showModel.accRestriction){
accs+=acc+"\n";
}
showDetailsAccTv.setText(accs);
if (showModel.confirmation == "" || showModel.confirmation == null){
showDetailsCb.setVisibility(View.GONE);
}else {
showDetailsCb.setText(showModel.confirmation);
isConfirm = true;
}
bookBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (!isConfirm) {
Intent seatsIntent = new Intent(ShowDetailsActivity.this, BookingSeatsActivity.class);
seatsIntent.putExtra("showIndex", showPosition + 1);
startActivity(seatsIntent);
}else {
if (showDetailsCb.isChecked()) {
Intent seatsIntent = new Intent(ShowDetailsActivity.this, BookingSeatsActivity.class);
seatsIntent.putExtra("showIndex", showPosition + 1);
startActivity(seatsIntent);
} else {
Toast.makeText(ShowDetailsActivity.this, "You must agree with the confirmation.", Toast.LENGTH_SHORT).show();
}
}
}
});
backIv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
}
}
\ No newline at end of file
package com.project.shakespearesbooking;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;
import android.view.WindowManager;
public class SplashActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
getSupportActionBar().hide();
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
SharedPreferences sharedPreferences = getSharedPreferences("login", MODE_PRIVATE);
boolean myBooleanValue = sharedPreferences.getBoolean("isLogin", false);
if (myBooleanValue) {
Intent intent = new Intent(SplashActivity.this, MainActivity.class);
startActivity(intent);
finish();
}else {
Intent intent = new Intent(SplashActivity.this, LoginActivity.class);
startActivity(intent);
finish();
}
}
}, 3000);
}
}
\ No newline at end of file
package com.project.shakespearesbooking.TestData;
import com.project.shakespearesbooking.models.ShowModel;
import com.project.shakespearesbooking.models.TicketTypeModel;
import java.util.ArrayList;
public class ShowData {
public ArrayList<ShowModel> shows = new ArrayList<ShowModel>();
public void addData(){
ShowModel d1 = new ShowModel();
d1.id = 1;
d1.showTitle = "The Merchant of Venice by William Shakespeare";
d1.dayTime = "20:00 Sunday";
d1.date = "April 23 2023";
d1.img = "https://cdn-academyblog.pressidium.com/wp-content/uploads/2020/05/Mother-Courage-and-Her-Children-Wright-State-Theatre-.jpg";
d1.address = "Merchant Adventurer's Hall, York";
d1.accRestriction.add("Has wheelchair access");
TicketTypeModel d1t1 = new TicketTypeModel();
d1t1.type = "Seated";
d1t1.count = 17;
d1t1.price = 8;
d1.ticketTypes.add(d1t1);
shows.add(d1);
ShowModel d2 = new ShowModel();
d2.id = 2;
d2.showTitle = "Hamlet by William Shakespeare";
d2.dayTime = "8:00";
d2.date = "19 May 2023";
d2.img = "https://res.cloudinary.com/bloomsbury-publishing-public/image/upload/q_auto,f_auto/dramaonlin/CMS/Charles_Surface_Adam_Redmore_and_the_Company.jpg";
d2.address = "Clifford's Tower, York";
d2.confirmation = "Users are required to tick a box to consent to being splattered with fake blood during the performance";
d2.accRestriction.add("Must be able to climb 20 steps");
d2.accRestriction.add("Performance includes flashing lights");
TicketTypeModel d2t1 = new TicketTypeModel();
d2t1.type = "Seated";
d2t1.count = 8;
d2t1.price = 8;
d2.ticketTypes.add(d2t1);
TicketTypeModel d2t2 = new TicketTypeModel();
d2t2.type = "Standing";
d2t2.count = 12;
d2t2.price = 7;
d2.ticketTypes.add(d2t2);
shows.add(d2);
ShowModel d3 = new ShowModel();
d3.id = 3;
d3.showTitle = "A Midsummer Night's Dream by William Shakespeare";
d3.dayTime = "19:00 Saturday";
d3.date = "3 June 2023";
d3.img = "https://images.squarespace-cdn.com/content/v1/5bc800cb9d41495b62cda8df/1570684303444-8TEJ89J42BVXDKCZTQPE/barber-895147_960_720.jpg";
d3.address = "Dean's Park, York";
d3.accRestriction.add("Has wheelchair access");
d3.accRestriction.add("Performance includes flashing lights");
TicketTypeModel d3t1 = new TicketTypeModel();
d3t1.type = "On Stage";
d3t1.count = 11;
d3t1.price = 4;
d3.ticketTypes.add(d3t1);
TicketTypeModel d3t2 = new TicketTypeModel();
d3t2.type = "Grass";
d3t2.count = 29;
d3t2.price = 4;
d3.ticketTypes.add(d3t2);
shows.add(d3);
ShowModel d4 = new ShowModel();
d4.id = 4;
d4.showTitle = "Oedipus the King by Sophocles";
d4.dayTime = "20:00 Friday";
d4.date = "28 July 2023";
d4.img = "https://i.guim.co.uk/img/media/c308350857416b8537c0a3b5442cffa3ca03ed31/0_0_2000_1334/master/2000.jpg?width=700&quality=85&auto=format&fit=max&s=c2a41deeee459db5c05f85ad07d1e2a0";
d4.address = "Mary's Abbey, Museum Gardens, York";
d4.accRestriction.add("Has wheelchair access");
TicketTypeModel d4t1 = new TicketTypeModel();
d4t1.type = "Seated";
d4t1.count = 5;
d4t1.price = 9;
d4.ticketTypes.add(d4t1);
TicketTypeModel d4t2 = new TicketTypeModel();
d4t2.type = "Standing";
d4t2.count = 12;
d4t2.price = 7;
d4.ticketTypes.add(d4t2);
shows.add(d4);
ShowModel d5 = new ShowModel();
d5.id = 5;
d5.showTitle = "The Tempest by William Shakespeare";
d5.dayTime = "14:00 Saturday";
d5.date = "19 August 2023";
d5.img = "https://media.timeout.com/images/102074921/750/422/image.jpg";
d5.address = "Milleneum Bridge, York";
d5.accRestriction.add("Has wheelchair access");
TicketTypeModel d5t1 = new TicketTypeModel();
d5t1.type = "Boat A";
d5t1.count = 6;
d5t1.price = 9;
d5.ticketTypes.add(d5t1);
TicketTypeModel d5t2 = new TicketTypeModel();
d5t2.type = "Boat B";
d5t2.count = 4;
d5t2.price = 9;
d5.ticketTypes.add(d5t2);
TicketTypeModel d5t3 = new TicketTypeModel();
d5t3.type = "Riverbank";
d5t3.count = 10;
d5t3.price = 7;
d5.ticketTypes.add(d5t3);
shows.add(d5);
ShowModel d6 = new ShowModel();
d6.id = 6;
d6.showTitle = "Antigone by Sophocles";
d6.dayTime = "21:00 Thursday";
d6.date = "20 September 2023";
d6.img = "https://cdn-academyblog.pressidium.com/wp-content/uploads/2020/05/life-is-a-dream-Sadlers-Wells-Independent-1024x768.jpg";
d6.address = "Crypt, York Minster, York";
d6.accRestriction.add("Must be able to climb 20 steps");
TicketTypeModel d6t1 = new TicketTypeModel();
d6t1.type = "Inner circle";
d6t1.count = 5;
d6t1.price = 16;
d6.ticketTypes.add(d6t1);
TicketTypeModel d6t2 = new TicketTypeModel();
d6t2.type = "Outer circle";
d6t2.count = 8;
d6t2.price = 13;
d6.ticketTypes.add(d6t2);
TicketTypeModel d6t3 = new TicketTypeModel();
d6t3.type = "Standing";
d6t3.count = 10;
d6t3.price = 10;
d6.ticketTypes.add(d6t3);
shows.add(d6);
}
}
package com.project.shakespearesbooking.TestData;
import com.project.shakespearesbooking.models.SeatModel;
import com.project.shakespearesbooking.models.ShowModel;
import com.project.shakespearesbooking.models.TicketModel;
import com.project.shakespearesbooking.models.TicketTypeModel;
import java.util.ArrayList;
public class TicketData {
public ArrayList<TicketModel> tickets = new ArrayList<>();
public ArrayList<ShowModel> shows = new ArrayList<>();
public ShowData showData = new ShowData();
public void addData(){
showData.addData();
shows = showData.shows;
TicketModel tm1 = new TicketModel();
tm1.id = 1;
tm1.showModel = shows.get(2);
SeatModel t1t1 = new SeatModel();
t1t1.price = 35;
t1t1.seatType = "Seated";
t1t1.seatCount = 2;
tm1.seatB.add(t1t1);
SeatModel t1t2 = new SeatModel();
t1t2.price = 30;
t1t2.seatType = "Standing";
t1t2.seatCount = 3;
tm1.seatB.add(t1t2);
tickets.add(tm1);
tickets.add(tm1);
tickets.add(tm1);
}
}
package com.project.shakespearesbooking;
import static android.content.Context.MODE_PRIVATE;
import android.annotation.SuppressLint;
import android.content.SharedPreferences;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.project.shakespearesbooking.Adapters.TicketRvAdapter;
import com.project.shakespearesbooking.Database.MyDatabaseHelper;
import com.project.shakespearesbooking.TestData.TicketData;
import com.project.shakespearesbooking.models.TicketModel;
import java.util.ArrayList;
public class TicketFragment extends Fragment {
private RecyclerView ticketRv;
private TextView ticketNotFoundTv;
private TicketRvAdapter ticketRvAdapter;
@SuppressLint("MissingInflatedId")
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View rootView = inflater.inflate(R.layout.fragment_ticket, container, false);
TicketData td = new TicketData();
td.addData();
MyDatabaseHelper dbHelper = new MyDatabaseHelper(getContext());
SharedPreferences sharedPreferences = getActivity().getSharedPreferences("login", MODE_PRIVATE);
String email = sharedPreferences.getString("email", "");
ArrayList<TicketModel> tickets = dbHelper.getAllTickets(getContext(), email);
ticketRvAdapter = new TicketRvAdapter(tickets, getActivity());
ticketRv = rootView.findViewById(R.id.bookingRv);
ticketNotFoundTv = rootView.findViewById(R.id.ticketNotFoundTv);
ticketRv.setLayoutManager(new LinearLayoutManager(getActivity()));
ticketRv.setAdapter(ticketRvAdapter);
if (tickets.size() > 0){
ticketNotFoundTv.setVisibility(View.GONE);
}else {
ticketNotFoundTv.setVisibility(View.VISIBLE);
}
return rootView;
}
}
\ No newline at end of file
package com.project.shakespearesbooking;
import androidx.appcompat.app.AppCompatActivity;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.project.shakespearesbooking.Database.MyDatabaseHelper;
import com.project.shakespearesbooking.models.SeatModel;
import com.project.shakespearesbooking.models.TicketModel;
import com.squareup.picasso.Picasso;
public class TicketsDetailsActivity extends AppCompatActivity {
ImageView backIv, ticketDetailsIv;
TextView ticketDetailsTitleTv, ticketsDetailRefTv, ticketsDetailDateTv, ticketsDetailTimeTv, ticketsDetailAddressTv,ticketsDetailSeatsTv;
Button ticketsDetailCancelBtn;
MyDatabaseHelper dbHelper;
@SuppressLint("MissingInflatedId")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tickets_details);
getSupportActionBar().hide();
backIv = findViewById(R.id.ticketDetailsBackIv);
ticketDetailsIv = findViewById(R.id.ticketDetailsIv);
ticketDetailsTitleTv = findViewById(R.id.ticketDetailsTitleTv);
ticketsDetailRefTv = findViewById(R.id.ticketsDetailRefTv);
ticketsDetailDateTv = findViewById(R.id.ticketsDetailDateTv);
ticketsDetailTimeTv = findViewById(R.id.ticketsDetailTimeTv);
ticketsDetailAddressTv = findViewById(R.id.ticketsDetailAddressTv);
ticketsDetailSeatsTv = findViewById(R.id.ticketsDetailSeatsTv);
ticketsDetailCancelBtn = findViewById(R.id.ticketsDetailCancelBtn);
Intent intent = getIntent();
int seatId = intent.getExtras().getInt("ticketId");
dbHelper = new MyDatabaseHelper(this);
TicketModel ticket = dbHelper.getTicket(this, seatId);
Picasso.get().load(ticket.showModel.img).into(ticketDetailsIv);
ticketDetailsTitleTv.setText(ticket.showModel.showTitle);
ticketsDetailRefTv.setText(String.valueOf(ticket.RefNo));
ticketsDetailDateTv.setText(ticket.showModel.date);
ticketsDetailTimeTv.setText(ticket.showModel.dayTime);
ticketsDetailAddressTv.setText(ticket.showModel.address);
String seats="";
for (SeatModel seat: ticket.seatB){
seats += seat.seatType+": "+seat.seatCount+"\n";
}
ticketsDetailSeatsTv.setText(seats);
backIv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
ticketsDetailCancelBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
dbHelper.deleteTicket(ticket, getApplicationContext());
finishAffinity();
Intent homeIntent = new Intent(getApplicationContext(), MainActivity.class);
startActivity(homeIntent);
}
});
}
}
\ No newline at end of file
package com.project.shakespearesbooking.models;
public class SeatModel {
public int id;
public String seatType;
public int seatCount;
public int price;
public int getId() {
return id;
}
public String getSeatType() {
return seatType;
}
public int getSeatCount() {
return seatCount;
}
public int getPrice() {
return price;
}
public void setId(int id) {
this.id = id;
}
public void setSeatType(String seatType) {
this.seatType = seatType;
}
public void setSeatCount(int seatCount) {
this.seatCount = seatCount;
}
public void setPrice(int price) {
this.price = price;
}
}
package com.project.shakespearesbooking.models;
import java.util.ArrayList;
public class ShowModel {
public int id;
public String showTitle;
public String dayTime;
public String img;
public String date;
public String address;
public String confirmation = null;
public ArrayList<String> accRestriction = new ArrayList<>();
public ArrayList<TicketTypeModel> ticketTypes = new ArrayList<>();
}
package com.project.shakespearesbooking.models;
import java.util.ArrayList;
public class TicketModel {
public int id;
public String note, fullName;
public String userId;
public long RefNo;
public ShowModel showModel;
public ArrayList<SeatModel> seatB = new ArrayList();
}
package com.project.shakespearesbooking.models;
public class TicketTypeModel {
public int id;
public String type;
public int count;
public int price;
}
package com.project.shakespearesbooking.models;
public class UserModel {
public String email, username, password;
}
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
\ No newline at end of file
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM17,13h-4v4h-2v-4L7,13v-2h4L11,7h2v4h4v2z"/>
</vector>
<vector android:autoMirrored="true" android:height="24dp"
android:tint="#000000" android:viewportHeight="24"
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M11.67,3.87L9.9,2.1 0,12l9.9,9.9 1.77,-1.77L3.54,12z"/>
</vector>
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M17,1H7C5.9,1 5,1.9 5,3v18c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2V3C19,1.9 18.1,1 17,1zM7,18V6h10v12H7zM16,11V9.14C16,8.51 15.55,8 15,8H9C8.45,8 8,8.51 8,9.14l0,1.96c0.55,0 1,0.45 1,1c0,0.55 -0.45,1 -1,1l0,1.76C8,15.49 8.45,16 9,16h6c0.55,0 1,-0.51 1,-1.14V13c-0.55,0 -1,-0.45 -1,-1C15,11.45 15.45,11 16,11zM12.5,14.5h-1v-1h1V14.5zM12.5,12.5h-1v-1h1V12.5zM12.5,10.5h-1v-1h1V10.5z"/>
</vector>
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10s10,-4.48 10,-10S17.52,2 12,2zM12,6c1.93,0 3.5,1.57 3.5,3.5S13.93,13 12,13s-3.5,-1.57 -3.5,-3.5S10.07,6 12,6zM12,20c-2.03,0 -4.43,-0.82 -6.14,-2.88C7.55,15.8 9.68,15 12,15s4.45,0.8 6.14,2.12C16.43,19.18 14.03,20 12,20z"/>
</vector>
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM17,13L7,13v-2h10v2z"/>
</vector>
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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=".BookingSeatsActivity">
<ImageView
android:id="@+id/seatBookBackIv"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginStart="30dp"
android:layout_marginTop="30dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_back" />
<TextView
android:id="@+id/textView16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:text="Select Your Seats"
android:fontFamily="@font/poppins_semibold"
android:textSize="18dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/seatBookTitleTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:textSize="17dp"
android:textAlignment="center"
android:fontFamily="@font/poppins_regular"
android:text="The Tempest by William Shakespeare"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView16" />
<Button
android:id="@+id/seatBookBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="30dp"
android:text="Confirm Booking"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/seatBookRv"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@+id/seatBookBtn"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/seatBookTitleTv" />
<TextView
android:id="@+id/seatBookTotalTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="30dp"
android:text="£0"
android:fontFamily="@font/poppins_semibold"
android:textSize="25dp"
app:layout_constraintBottom_toBottomOf="@+id/textView16"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView16" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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=".LoginActivity">
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="140dp"
android:text="Login"
android:textSize="30dp"
android:fontFamily="@font/poppins_bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/userNameIL"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="50dp"
android:layout_marginEnd="20dp"
android:hint="Email"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView3">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/emailEt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/passwordIL"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:hint="Password"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/userNameIL">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/passwordEt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword" />
</com.google.android.material.textfield.TextInputLayout>
<TextView
android:id="@+id/registerTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textColor="#3F51B5"
android:text="If you don't have an account? register now."
app:layout_constraintEnd_toEndOf="@+id/passwordIL"
app:layout_constraintTop_toBottomOf="@+id/passwordIL" />
<com.google.android.material.button.MaterialButton
android:id="@+id/loginBtn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="20dp"
android:text="Login"
android:textAllCaps="false"
app:cornerRadius="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/registerTv" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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=".MainActivity"
android:id="@+id/root">
<FrameLayout
android:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@+id/bottomNavigationView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</FrameLayout>
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottomNavigationView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:menu="@menu/bottom_nav_menu"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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=".RegisterActivity">
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="130dp"
android:fontFamily="@font/poppins_bold"
android:text="Register"
android:textSize="30dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/regUsernameIL"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="50dp"
android:layout_marginEnd="20dp"
android:hint="Username"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView3">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/regUsernameEt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/regEmailIl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:hint="Email"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/regUsernameIL">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/regEmailET"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/regPasswordIL"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:hint="Password"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/regEmailIl">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/regPasswordEt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword" />
</com.google.android.material.textfield.TextInputLayout>
<TextView
android:id="@+id/loginTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textColor="#3F51B5"
android:text="If you already have an account? Login now."
app:layout_constraintEnd_toEndOf="@+id/regPasswordIL"
app:layout_constraintTop_toBottomOf="@+id/regPasswordIL" />
<com.google.android.material.button.MaterialButton
android:id="@+id/registerBtn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="20dp"
android:text="Register"
android:textAllCaps="false"
app:cornerRadius="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/loginTv" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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=".ShowDetailsActivity">
<ScrollView
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.5">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/showDetailsBackIv"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginStart="30dp"
android:layout_marginTop="30dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_back" />
<androidx.cardview.widget.CardView
android:id="@+id/cardView2"
android:layout_width="200dp"
android:layout_height="270dp"
android:layout_marginTop="15dp"
app:cardCornerRadius="15dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/showDetailsTitleTv">
<ImageView
android:id="@+id/showDetailsIv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
app:srcCompat="@drawable/test_show" />
</androidx.cardview.widget.CardView>
<TextView
android:id="@+id/showDetailsTitleTv"
android:layout_width="270dp"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:fontFamily="@font/poppins_semibold"
android:text="Hamlet by William Shakespeare"
android:textAlignment="center"
android:textSize="18dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView34"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:fontFamily="@font/poppins_light"
android:text="Time:"
app:layout_constraintEnd_toStartOf="@+id/showDetailsTimeTv"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cardView2" />
<TextView
android:id="@+id/showDetailsTimeTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:fontFamily="@font/poppins_light"
android:text="10.00pm"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/textView34"
app:layout_constraintTop_toTopOf="@+id/textView34" />
<TextView
android:id="@+id/textView40"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:fontFamily="@font/poppins_light"
android:text="Date:"
app:layout_constraintEnd_toStartOf="@+id/showDetailsDateTv"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/showDetailsTimeTv" />
<TextView
android:id="@+id/showDetailsDateTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:fontFamily="@font/poppins_light"
android:text="07.06.2023"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/textView40"
app:layout_constraintTop_toTopOf="@+id/textView40" />
<TextView
android:id="@+id/textView42"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:fontFamily="@font/poppins_light"
android:text="Address:"
app:layout_constraintEnd_toStartOf="@+id/showDetailsAddressTv"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/showDetailsDateTv" />
<TextView
android:id="@+id/showDetailsAddressTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:fontFamily="@font/poppins_light"
android:text="Jaffna"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/textView42"
app:layout_constraintTop_toTopOf="@+id/textView42" />
<TextView
android:id="@+id/textView44"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:fontFamily="@font/poppins_light"
android:text="seats:"
app:layout_constraintEnd_toStartOf="@+id/showDetailsSeatsTv"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/showDetailsAddressTv" />
<TextView
android:id="@+id/showDetailsSeatsTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:fontFamily="@font/poppins_light"
android:text="Seating 4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/textView44"
app:layout_constraintTop_toTopOf="@+id/textView44" />
<TextView
android:id="@+id/textView46"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:fontFamily="@font/poppins_regular"
android:text="Accessibilities"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/showDetailsSeatsTv" />
<TextView
android:id="@+id/showDetailsAccTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:fontFamily="@font/poppins_light"
android:text="Must be able to climb 20 steps \nPerformance includes flashing lights"
android:textAlignment="center"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView46" />
<Button
android:id="@+id/showDetailsBookBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:fontFamily="@font/poppins_semibold"
android:text="Book Now"
android:textAllCaps="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/showDetailsCb" />
<CheckBox
android:id="@+id/showDetailsCb"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:fontFamily="@font/poppins_regular"
android:text="Users are required to tick a box to consent to being splattered with fake blood during the performance"
android:textSize="13dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/showDetailsAccTv" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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=".SplashActivity">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:text="Shakespear's\nBooking"
android:fontFamily="@font/poppins_bold"
android:textSize="30dp"
android:textAlignment="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/imageView"
app:layout_constraintStart_toStartOf="@+id/imageView"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
<ImageView
android:id="@+id/imageView"
android:layout_width="139dp"
android:layout_height="126dp"
app:layout_constraintBottom_toTopOf="@+id/textView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed"
app:srcCompat="@drawable/app_icon" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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=".TicketsDetailsActivity">
<TextView
android:id="@+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:fontFamily="@font/poppins_semibold"
android:text="Ticket Details"
android:textSize="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/ticketDetailsTitleTv"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:fontFamily="@font/poppins_regular"
android:text="Show Title"
android:textAlignment="center"
android:textSize="18dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView8" />
<androidx.cardview.widget.CardView
android:id="@+id/cardView2"
android:layout_width="200dp"
android:layout_height="270dp"
android:layout_marginTop="15dp"
app:cardCornerRadius="15dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ticketDetailsTitleTv">
<ImageView
android:id="@+id/ticketDetailsIv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
app:srcCompat="@drawable/test_show" />
</androidx.cardview.widget.CardView>
<TextView
android:id="@+id/ticketsDetailDateTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:fontFamily="@font/poppins_light"
android:text="24.06.2023"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/textView15"
app:layout_constraintTop_toTopOf="@+id/textView15" />
<TextView
android:id="@+id/ticketsDetailSeatsTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:fontFamily="@font/poppins_light"
android:text="Seating: 5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/textView19"
app:layout_constraintTop_toTopOf="@+id/textView19" />
<TextView
android:id="@+id/textView19"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:fontFamily="@font/poppins_light"
android:text="Seats:"
app:layout_constraintEnd_toStartOf="@+id/ticketsDetailSeatsTv"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ticketsDetailAddressTv" />
<TextView
android:id="@+id/textView15"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:fontFamily="@font/poppins_light"
android:text="Date: "
app:layout_constraintEnd_toStartOf="@+id/ticketsDetailDateTv"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ticketsDetailRefTv" />
<TextView
android:id="@+id/ticketsDetailTimeTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:fontFamily="@font/poppins_light"
android:text="09.03pm"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/textView17"
app:layout_constraintTop_toTopOf="@+id/textView17" />
<TextView
android:id="@+id/textView17"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:fontFamily="@font/poppins_light"
android:text="Time:"
app:layout_constraintEnd_toStartOf="@+id/ticketsDetailTimeTv"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ticketsDetailDateTv" />
<TextView
android:id="@+id/textView21"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:fontFamily="@font/poppins_light"
android:text="Reference No:"
app:layout_constraintEnd_toStartOf="@+id/ticketsDetailRefTv"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cardView2" />
<TextView
android:id="@+id/ticketsDetailRefTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:fontFamily="@font/poppins_light"
android:text="TextView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/textView21"
app:layout_constraintTop_toTopOf="@+id/textView21" />
<Button
android:id="@+id/ticketsDetailCancelBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="40dp"
android:backgroundTint="#DA3E3E"
android:fontFamily="@font/poppins_bold"
android:text="Cancel My Booking"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" />
<ImageView
android:id="@+id/ticketDetailsBackIv"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginStart="30dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView8"
app:srcCompat="@drawable/ic_back" />
<TextView
android:id="@+id/textView11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:fontFamily="@font/poppins_light"
android:text="Address:"
app:layout_constraintEnd_toStartOf="@+id/ticketsDetailAddressTv"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ticketsDetailTimeTv" />
<TextView
android:id="@+id/ticketsDetailAddressTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:fontFamily="@font/poppins_light"
android:text="Jaffna"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/textView11"
app:layout_constraintTop_toTopOf="@+id/textView11" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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=".HomeFragment">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/homeGallerySearchTl"
style="@style/DropdownMenuStyle"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginStart="30dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="30dp"
app:boxBackgroundColor="#00ffffff"
app:boxCornerRadiusBottomEnd="25dp"
app:boxCornerRadiusBottomStart="25dp"
app:boxCornerRadiusTopEnd="25dp"
app:boxCornerRadiusTopStart="25dp"
app:endIconDrawable="@drawable/ic_search"
app:hintEnabled="false"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<AutoCompleteTextView
android:id="@+id/searchEt"
android:layout_width="match_parent"
android:layout_height="50dp"
android:fontFamily="@font/poppins_light"
android:gravity="center_vertical"
android:hint="Search shows..."
android:imeOptions="actionSearch"
android:inputType="text"
android:paddingVertical="0dp"
android:textSize="18sp" />
</com.google.android.material.textfield.TextInputLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/showsRv"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/homeGallerySearchTl" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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=".ProfileFragment">
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:fontFamily="@font/poppins_semibold"
android:text="Profile"
android:textSize="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_marginTop="40dp"
android:src="@drawable/ic_profile"
android:tint="#676565"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="50dp"
android:layout_marginEnd="5dp"
android:fontFamily="@font/poppins_regular"
android:text="Name:"
android:textSize="15dp"
app:layout_constraintEnd_toStartOf="@+id/proUserTv"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView2" />
<TextView
android:id="@+id/proUserTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginEnd="15dp"
android:fontFamily="@font/poppins_regular"
android:text="TestName"
android:textSize="15dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/textView4"
app:layout_constraintTop_toTopOf="@+id/textView4" />
<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="5dp"
android:fontFamily="@font/poppins_regular"
android:text="Email:"
android:textSize="15dp"
app:layout_constraintEnd_toStartOf="@+id/proEmailTv"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/proUserTv" />
<TextView
android:id="@+id/proEmailTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginEnd="15dp"
android:fontFamily="@font/poppins_regular"
android:text="Test@gmail.com"
android:textSize="15dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/textView6"
app:layout_constraintTop_toTopOf="@+id/textView6" />
<Button
android:id="@+id/signOutBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="40dp"
android:text="Sign Out"
android:textAllCaps="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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=".TicketFragment">
<TextView
android:id="@+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:fontFamily="@font/poppins_semibold"
android:text="Your Booking"
android:textSize="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/bookingRv"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView9" />
<TextView
android:id="@+id/ticketNotFoundTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tickets are Empty!"
android:fontFamily="@font/poppins_semibold"
android:textSize="25dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.5" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="15dp"
app:cardUseCompatPadding="true"
app:cardElevation="15dp"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingHorizontal="20dp">
<TextView
android:id="@+id/textView18"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:fontFamily="@font/poppins_regular"
android:text="Enter your full name"
android:textSize="18dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textInputLayout"
android:layout_width="match_parent"
style="@style/TextInputLayoutStyle"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
app:boxBackgroundColor="#00ffffff"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView18"
app:shapeAppearanceOverlay="@style/RoundedTextInputLayout">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/alertNameEt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Name"
android:fontFamily="@font/poppins_light"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<Button
android:id="@+id/alertNameBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:text="Finish"
android:textAllCaps="false"
android:fontFamily="@font/poppins_semibold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textInputLayout" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView 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="wrap_content"
app:cardCornerRadius="15dp"
app:cardElevation="15dp"
app:cardUseCompatPadding="true">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20dp">
<TextView
android:id="@+id/textView18"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:fontFamily="@font/poppins_regular"
android:text="Add Note"
android:textSize="18dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textInputLayout2"
style="@style/TextInputLayoutStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
app:boxBackgroundColor="#00ffffff"
app:boxCornerRadiusBottomEnd="15dp"
app:boxCornerRadiusBottomStart="15dp"
app:boxCornerRadiusTopEnd="15dp"
app:boxCornerRadiusTopStart="15dp"
app:layout_constraintTop_toBottomOf="@+id/textView18"
tools:layout_editor_absoluteX="21dp">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/alertNoteEt"
android:layout_width="match_parent"
android:layout_height="200dp"
android:fontFamily="@font/poppins_light"
android:hint="Enter your note"
android:gravity="top|left"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<Button
android:id="@+id/alertNoteBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:fontFamily="@font/poppins_semibold"
android:text="Continue"
android:textAllCaps="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textInputLayout2" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView 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="wrap_content"
app:cardElevation="5dp"
app:cardUseCompatPadding="true"
app:cardCornerRadius="15dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/seatSelectTypeTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:fontFamily="@font/poppins_semibold"
android:text="Seating"
android:textSize="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView20"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:layout_marginTop="20dp"
android:fontFamily="@font/poppins_regular"
android:text="Remaining:"
android:textSize="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/seatSelectTypeTv" />
<TextView
android:id="@+id/seatSelectRemainingTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:fontFamily="@font/poppins_regular"
android:text="0"
android:textSize="16dp"
app:layout_constraintStart_toEndOf="@+id/textView20"
app:layout_constraintTop_toTopOf="@+id/textView20" />
<TextView
android:id="@+id/textView22"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:layout_marginTop="10dp"
android:text="Price:"
android:textSize="16dp"
android:fontFamily="@font/poppins_regular"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView20" />
<TextView
android:id="@+id/textView23"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="20dp"
android:fontFamily="@font/poppins_regular"
android:text="Add your seats:"
android:textSize="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView22" />
<TextView
android:id="@+id/seatSelectCountTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="60dp"
android:fontFamily="@font/poppins_semibold"
android:paddingHorizontal="10dp"
android:paddingTop="5dp"
android:text="0"
android:textSize="40dp"
app:layout_constraintBottom_toBottomOf="@+id/textView23"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView23" />
<ImageView
android:id="@+id/seatSelectIncreaseIv"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginStart="5dp"
app:layout_constraintBottom_toBottomOf="@+id/seatSelectCountTv"
app:layout_constraintStart_toEndOf="@+id/seatSelectCountTv"
app:layout_constraintTop_toTopOf="@+id/seatSelectCountTv"
app:srcCompat="@drawable/ic_add" />
<ImageView
android:id="@+id/seatSelectDecreaseIv"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginEnd="5dp"
app:layout_constraintBottom_toBottomOf="@+id/seatSelectCountTv"
app:layout_constraintEnd_toStartOf="@+id/seatSelectCountTv"
app:layout_constraintTop_toTopOf="@+id/seatSelectCountTv"
app:srcCompat="@drawable/ic_remove" />
<TextView
android:id="@+id/seatSelectPriceTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:text="$9"
android:textSize="16dp"
android:fontFamily="@font/poppins_regular"
app:layout_constraintStart_toEndOf="@+id/textView22"
app:layout_constraintTop_toTopOf="@+id/textView22" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="300dp"
app:cardElevation="5dp"
app:cardUseCompatPadding="true"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:cardCornerRadius="15dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/showItemIv"
android:layout_width="0dp"
android:layout_height="0dp"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.5"
app:srcCompat="@drawable/test_show" />
<View
android:id="@+id/view"
android:layout_width="wrap_content"
android:layout_height="100dp"
android:background="#80000000"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/showItemTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Show Name"
android:textAlignment="center"
android:paddingHorizontal="7dp"
android:textColor="@color/white"
android:fontFamily="@font/poppins_regular"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/view" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView 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"
app:cardCornerRadius="15dp"
app:cardElevation="15dp"
app:cardUseCompatPadding="true"
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/imageView4"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginTop="30dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/success" />
<TextView
android:id="@+id/textView24"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:fontFamily="@font/poppins_bold"
android:text="Successfully Booked"
android:textColor="#8AD298"
android:textSize="25dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView4" />
<Button
android:id="@+id/successBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:backgroundTint="#3EB555"
android:text="Close"
android:textAllCaps="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView24" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView
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="wrap_content"
app:cardCornerRadius="15dp"
android:minHeight="280dp"
app:cardElevation="5dp"
app:cardUseCompatPadding="true">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/ticketItemCl"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingHorizontal="10dp">
<androidx.cardview.widget.CardView
android:id="@+id/cardView"
android:layout_width="150dp"
android:layout_height="200dp"
android:layout_marginTop="10dp"
app:cardCornerRadius="10dp"
app:cardElevation="5dp"
app:cardUseCompatPadding="true"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/ticketIv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
app:srcCompat="@drawable/test_show" />
</androidx.cardview.widget.CardView>
<TextView
android:id="@+id/ticketTitleTv"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:fontFamily="@font/poppins_semibold"
android:text="Title"
android:textSize="18dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/cardView"
app:layout_constraintTop_toTopOf="@+id/cardView" />
<TextView
android:id="@+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:fontFamily="@font/poppins_light"
android:text="Date:"
app:layout_constraintStart_toEndOf="@+id/cardView"
app:layout_constraintTop_toBottomOf="@+id/ticketTitleTv" />
<TextView
android:id="@+id/textView12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Time:"
app:layout_constraintStart_toEndOf="@+id/cardView"
app:layout_constraintTop_toBottomOf="@+id/textView10" />
<TextView
android:id="@+id/textView13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Seats:"
app:layout_constraintStart_toEndOf="@+id/cardView"
app:layout_constraintTop_toBottomOf="@+id/textView12" />
<TextView
android:id="@+id/textView14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="15dp"
android:fontFamily="@font/poppins_light"
android:text="Ref no:"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@+id/cardView"
app:layout_constraintTop_toBottomOf="@+id/cardView" />
<TextView
android:id="@+id/ticketDateTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:fontFamily="@font/poppins_light"
android:text="3 April 2023"
app:layout_constraintBottom_toBottomOf="@+id/textView10"
app:layout_constraintStart_toEndOf="@+id/textView10"
app:layout_constraintTop_toTopOf="@+id/textView10" />
<TextView
android:id="@+id/ticketTimeTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:fontFamily="@font/poppins_light"
android:text="09:03Pm"
app:layout_constraintBottom_toBottomOf="@+id/textView12"
app:layout_constraintStart_toEndOf="@+id/textView12"
app:layout_constraintTop_toTopOf="@+id/textView12" />
<TextView
android:id="@+id/ticketSeatsTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:fontFamily="@font/poppins_light"
android:text=""
app:layout_constraintStart_toEndOf="@+id/textView13"
app:layout_constraintTop_toTopOf="@+id/textView13" />
<TextView
android:id="@+id/ticketRefTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:fontFamily="@font/poppins_light"
android:text="13412341234134123"
app:layout_constraintBottom_toBottomOf="@+id/textView14"
app:layout_constraintStart_toEndOf="@+id/textView14"
app:layout_constraintTop_toTopOf="@+id/textView14" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:title="Home"
android:icon="@drawable/ic_home"
android:id="@+id/home"/>
<item android:title="Ticket"
android:icon="@drawable/ic_booking"
android:id="@+id/ticket"/>
<item android:title="profile"
android:icon="@drawable/ic_profile"
android:id="@+id/profile"/>
</menu>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
\ No newline at end of file
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.ShakespearesBooking" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/black</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_200</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>
\ No newline at end of file
<resources>
<string name="app_name">Shakespeare\'s Booking</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
</resources>
\ No newline at end of file
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.ShakespearesBooking" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
<style name="DropdownMenuStyle" parent="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu">
<item name="boxStrokeColor">@color/black</item>
<item name="strokeColor">@color/black</item>
<item name="boxStrokeWidth">2dp</item>
</style>
<style name="RoundedTextInputLayout" parent="">
<item name="cornerSize">15dp</item>
</style>
<style name="TextInputLayoutStyle" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<!-- <item name="boxStrokeColor">@color/primaryColor</item>-->
<item name="boxStrokeWidth">2dp</item>
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!--
Sample backup rules file; uncomment and customize as necessary.
See https://developer.android.com/guide/topics/data/autobackup
for details.
Note: This file is ignored for devices older that API 31
See https://developer.android.com/about/versions/12/backup-restore
-->
<full-backup-content>
<!--
<include domain="sharedpref" path="."/>
<exclude domain="sharedpref" path="device.xml"/>
-->
</full-backup-content>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!--
Sample data extraction rules file; uncomment and customize as necessary.
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
for details.
-->
<data-extraction-rules>
<cloud-backup>
<!-- TODO: Use <include> and <exclude> to control what is backed up.
<include .../>
<exclude .../>
-->
</cloud-backup>
<!--
<device-transfer>
<include .../>
<exclude .../>
</device-transfer>
-->
</data-extraction-rules>
\ No newline at end of file
package com.project.shakespearesbooking;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.4.2' apply false
id 'com.android.library' version '7.4.2' apply false
}
\ No newline at end of file
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
\ No newline at end of file
#Sun May 07 10:20:08 IST 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
rootProject.name = "Shakespeare's Booking"
include ':app'
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