Commit 2bdc5846 authored by andreea.tudor's avatar andreea.tudor

Assessment

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
<?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="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="PLATFORM" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="11" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="1.8" 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="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
</set>
</option>
</component>
</project>
\ No newline at end of file
/build
\ No newline at end of file
plugins {
id 'com.android.application'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.museumapp"
minSdkVersion 16
targetSdkVersion 30
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.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0';
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
\ 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
package com.example.museumapp;
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.example.museumapp", 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"
package="com.example.museumapp">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MuseumApp">
<activity android:name=".ConfirmationPage"></activity>
<activity android:name=".PaymentPage" />
<activity android:name=".SummaryPage" />
<activity android:name=".ShopPage" />
<activity android:name=".CafePage" />
<activity android:name=".Booking_page" />
<activity android:name=".LoginPage" />
<activity android:name=".MuseumPage" />
<activity android:name=".MainPage" />
<activity android:name=".RegistrationPage" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
\ No newline at end of file
package com.example.museumapp;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import android.app.DatePickerDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.GridView;
import java.util.ArrayList;
import java.util.Calendar;
public class Booking_page extends AppCompatActivity {
Bundle museumBundle;
String date;
String time;
DatePickerDialog picker;
EditText dateTxt;
Button b;
TimeSlotAdapter timeAdapter;
ArrayList<Slot> timeSlotList;
GridView timeGV;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_booking_page);
//get bundle
museumBundle = getIntent().getExtras();
//pick date
//adapted from https://www.tutlane.com/tutorial/android/android-datepicker-with-examples
b = findViewById(R.id.calendarBtn);
dateTxt = findViewById(R.id.editTextDate);
b.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//default date
final Calendar calendar = Calendar.getInstance();
int day = calendar.get(Calendar.DAY_OF_MONTH);
int month = calendar.get(Calendar.MONTH);
int year = calendar.get(Calendar.YEAR);
picker = new DatePickerDialog(Booking_page.this, new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {
//set editText to selected date
dateTxt.setText(dayOfMonth + "/" + month + "/" + year);
}
}, year, month, day);
picker.show();
}
});//end date listener class
//pick time
timeSlotList = new ArrayList<>();
timeSlotList.add(new Slot("9 - 11am"));
timeSlotList.add(new Slot("11 - 1pm"));
timeSlotList.add(new Slot("1 - 3pm"));
timeSlotList.add(new Slot("3 - 5pm"));
//setup grid view
timeGV = findViewById(R.id.timeGridView);
timeAdapter = new TimeSlotAdapter(this, timeSlotList);
timeGV.setAdapter(timeAdapter);
}
public void goToMuseumPage(View v){
Intent intent = new Intent(this, MuseumPage.class);
intent.putExtras(museumBundle);
startActivity(intent);
}
public void goToCafePage(View v){
date = dateTxt.getText().toString();
time = timeAdapter.selectedTime;
if(date.isEmpty() || time == null){
AlertDialog.Builder buildAlert = new AlertDialog.Builder(Booking_page.this);
buildAlert.setTitle("Empty field");
buildAlert.setMessage("All the fields are mandatory. Select both date and time.");
buildAlert.setPositiveButton("OK", new DialogInterface.OnClickListener(){
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
}
);
AlertDialog alertCreate = buildAlert.create();
alertCreate.show();
}
else {
//send data to next page
Intent intent = new Intent(this, CafePage.class);
intent.putExtras(museumBundle);
intent.putExtra("date", date);
intent.putExtra("time", time);
startActivity(intent);
}
}
}
\ No newline at end of file
package com.example.museumapp;
import android.content.Context;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.cardview.widget.CardView;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
import java.util.List;
public class CafeAdapter extends RecyclerView.Adapter<CafeAdapter.ViewHolder> {
private List<Refreshment> cafeList;
private LayoutInflater inflater;
String selectedRefreshName;
int selectedRefreshQty, selectedRefreshPrice;
int q = 0;
Refreshment lastSelected;
int lastSelectedPosition, selectedPosition;
TextView lastSelectedQty;
//constructor
CafeAdapter(Context context, List<Refreshment> cafeList){
this.inflater = LayoutInflater.from(context);
this.cafeList = cafeList;
}
//inflate row from xml when needed
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = inflater.inflate(R.layout.cafe_row, parent, false);
return new ViewHolder(view);
}
//bind data to textView in the custom view
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
String name = cafeList.get(position).name;
int cost = cafeList.get(position).cost;
int qty = cafeList.get(position).quantity;
int img = cafeList.get(position).image;
holder.titleHolder.setText(name + " £" + cost);
holder.quantityHolder.setText(String.valueOf(qty));
holder.imageHolder.setImageResource(img);
//click listener for plus
holder.plusHolder.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
q = cafeList.get(position).quantity;
q = q + 1 ;
int c = q * cost;
holder.quantityHolder.setText(String.valueOf(q));
cafeList.get(position).quantity = q;
//store selection
selectedPosition = position;
selectedRefreshName = cafeList.get(position).name;
selectedRefreshQty = q;
selectedRefreshPrice = c;
if(selectedPosition != lastSelectedPosition){
lastSelectedQty.setText("0");
lastSelected.quantity = 0;
}
lastSelected = cafeList.get(position);
lastSelectedPosition = position;
lastSelectedQty = holder.quantityHolder;
}
});
//click listener for minus
holder.minusHolder.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if(q > 0){
q = cafeList.get(position).quantity;
q = q - 1 ;
holder.quantityHolder.setText(String.valueOf(q));
cafeList.get(position).quantity = q;
selectedRefreshQty = q;
}
if(q == 0){
selectedRefreshName = null;
selectedRefreshQty = 0;
selectedRefreshPrice = 0;
}
}
});
}
//get the number of the items
@Override
public int getItemCount() {
return cafeList.size();
}
//create and retrieve data when user scroll
public class ViewHolder extends RecyclerView.ViewHolder {
TextView titleHolder;
ImageView plusHolder;
TextView quantityHolder;
ImageView minusHolder;
ImageView imageHolder;
ViewHolder(View v) {
super(v);
titleHolder = itemView.findViewById(R.id.refreshmentTitle);
plusHolder = itemView.findViewById(R.id.plus);
quantityHolder = itemView.findViewById(R.id.refQuantity);
minusHolder = itemView.findViewById(R.id.minus);
imageHolder = itemView.findViewById(R.id.cafeImage);
}
}
}
package com.example.museumapp;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import java.util.ArrayList;
import java.util.List;
public class CafePage extends AppCompatActivity {
Bundle cafeBundle;
CafeAdapter adapterObj;
ArrayList<Refreshment> cafeList;
RecyclerView recyclerObj;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_cafe_page);
//get bundle
cafeBundle = getIntent().getExtras();
//recycler data
cafeList = new ArrayList<>();
cafeList.add(new Refreshment("Tea", 1, 0, R.drawable.tea ));
cafeList.add(new Refreshment("Water", 1, 0, R.drawable.water ));
cafeList.add(new Refreshment("Coffee", 2, 0, R.drawable.coffee ));
cafeList.add(new Refreshment("Flatbread", 2,0, R.drawable.flatbread ));
cafeList.add(new Refreshment("Sandwich", 2,0, R.drawable.sandwich ));
cafeList.add(new Refreshment("Sweet roll", 2,0, R.drawable.sweetroll ));
cafeList.add(new Refreshment("Salad", 2,0, R.drawable.salad ));
//set up RecyclerView
recyclerObj = findViewById(R.id.cafeRecycler);
recyclerObj.setLayoutManager(new LinearLayoutManager(this));
adapterObj = new CafeAdapter(this, cafeList);
recyclerObj.setAdapter(adapterObj);
}
public void goToShop(View v){
Intent intent = new Intent(this, ShopPage.class);
intent.putExtra("refreshmentName", adapterObj.selectedRefreshName);
intent.putExtra("refreshmentQty", adapterObj.selectedRefreshQty);
intent.putExtra("refreshmentPrice", adapterObj.selectedRefreshPrice);
intent.putExtras(cafeBundle);
startActivity(intent);
}
public void goToBookingPage(View v){
Intent intent = new Intent(this, Booking_page.class);
intent.putExtras(cafeBundle);
startActivity(intent);
}
}
\ No newline at end of file
package com.example.museumapp;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
public class ConfirmationPage extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_confirmation_page);
int n1, n2, n3;
n1 = (int)(Math.floor(Math.random() * 99) + 10);
n2 = (int)(Math.floor(Math.random() * 99) + 10);
n3 = (int)(Math.floor(Math.random() * 99) + 10);
TextView codeView = findViewById(R.id.confirmationCodeTxt);
codeView.setText(n1 + " " + n2 + " " + n3);
}
public void goToList(View v){
Intent intent = new Intent(this, MainPage.class);
startActivity(intent);
}
}
\ No newline at end of file
package com.example.museumapp;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
public class LoginPage extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login_page);
}
public void loginFn(View v){
//get fields view
EditText usernameView = (EditText) findViewById(R.id.usernameLoginTxt);
EditText passwordView = (EditText) findViewById(R.id.passwordLoginTxt);
myDBConnector objDBConnector = new myDBConnector(this, null, null, 1);
//check login
if ( objDBConnector.checkLogin( usernameView.getText().toString(), passwordView.getText().toString() ) ){
//open main page
Intent intent = new Intent(this, MainPage.class);
//get username's name
String name = objDBConnector.getUserName(usernameView.getText().toString());
//send name to main page
intent.putExtra("name", name);
startActivity(intent);
}
else{
Toast.makeText(getApplicationContext(), "Wrong username or password", Toast.LENGTH_LONG).show();
}
}
public void goToRegistration(View v){
Intent intent = new Intent(this, RegistrationPage.class);
startActivity(intent);
}
}
package com.example.museumapp;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void goToRegistration(View v){
Intent intent = new Intent(this, RegistrationPage.class);
startActivity(intent);
}
public void goToLogin(View v){
Intent intent = new Intent(this, LoginPage.class);
startActivity(intent);
}
}
\ No newline at end of file
package com.example.museumapp;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import java.util.ArrayList;
public class MainPage extends AppCompatActivity {
adapter adapterObj;
ArrayList<Museum> museumList;
RecyclerView recyclerObj;
ArrayList searchList;
public String username;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main_page);
//get intent
Intent intentMainPage = getIntent();
username = intentMainPage.getStringExtra("name");
//welcome message
Toast.makeText(getApplicationContext(), "Welcome " + username + "!", Toast.LENGTH_LONG).show();
//recycler data
museumList = new ArrayList<>();
museumList.add(new Museum("Louvre",
"The Louvre, or the Louvre Museum, is the world's largest art museum and a historic monument in Paris, France, and is best known for being the home of the Mona Lisa.",
"Paris", "France", 10, username));
museumList.add(new Museum(
"National Museum of China", "The museum's mission is to educate about the arts and history of China.",
"Beijing", "China", 10, username));
museumList.add(new Museum("Vatican Museums",
"They display works from the immense collection amassed by the Catholic Church and the papacy throughout the centuries including several of the most renowned Roman sculptures and most important masterpieces of Renaissance art in the world.",
"Vatican City", "Vatican", 10, username));
museumList.add(new Museum("Metropolitan Museum of Art",
"The Metropolitan Museum of Art of New York City, colloquially \"the Met\", is the largest art museum in the United States. Its permanent collection contains over 2 million works, divided among 17 curatorial departments.",
"New York City", "US", 10, username));
museumList.add(new Museum("British Museum",
"Its permanent collection of some eight million works is among the largest and most comprehensive in existence, having been widely collected during the era of the British Empire.",
"London", "UK", 10, username));
museumList.add(new Museum("Tate Modern",
"It houses the United Kingdom's national collection of international modern and contemporary art, and forms part of the Tate group together with Tate Britain, Tate Liverpool and Tate St Ives.",
"London", "UK", 5, username));
museumList.add(new Museum("National Gallery",
"Founded in 1824, it houses a collection of over 2,300 paintings dating from the mid-13th century to 1900.",
"London", "UK", 5, username));
museumList.add(new Museum("Natural History Museum",
"It is one of three major museums on Exhibition Road in South Kensington, the others being the Science Museum and the Victoria and Albert Museum.",
"London", "UK", 5, username));
museumList.add(new Museum("American Museum of Natural History",
"The museum collections contain over 34 million specimens of plants, animals, fossils, minerals, rocks, meteorites, human remains, and human cultural artifacts, as well as specialized collections for frozen tissue and genomic and astrophysical data, of which only a small fraction can be displayed at any given time.",
"New York City", "US", 5, username));
museumList.add(new Museum("State Hermitage Museum",
"The second-largest art museum in the world, it was founded in 1764 when Empress Catherine the Great acquired an impressive collection of paintings from the Berlin merchant Johann Ernst Gotzkowsky.",
"Saint Petersburg", "Russia", 5, username));
//set up RecyclerView
recyclerObj = findViewById(R.id.recyclerID);
recyclerObj.setLayoutManager(new LinearLayoutManager(this));
adapterObj = new adapter(this, museumList);
recyclerObj.setAdapter(adapterObj);
}//end onCreate fn
public void searchMuseum(View v){
//get input
String museumName = ((EditText)findViewById(R.id.searchTxt)).getText().toString();
//search for museum in list
if(museumList.contains(museumName)){
searchList = new ArrayList<String>();
searchList.add(museumName);
recyclerObj.setLayoutManager(new LinearLayoutManager(this));
adapterObj = new adapter(this, searchList);
recyclerObj.setAdapter(adapterObj);
}
else{
}
}
public void deleteText(View v){
//on click on search delete text
((EditText)findViewById(R.id.searchTxt)).setText("");
}
}
\ No newline at end of file
package com.example.museumapp;
public class Museum {
String name, description, city, country, UserName;
int fee;
Museum(String n, String d, String ci, String co, int f, String UserName){
name = n;
description = d;
city = ci;
country = co;
fee = f;
this.UserName = UserName;
}
}
package com.example.museumapp;
import androidx.appcompat.app.AppCompatActivity;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
public class MuseumPage extends AppCompatActivity {
Bundle bundle;
String username;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_museum_page);
bundle = getIntent().getExtras();
String selectedMuseum = bundle.getString("selectedMuseum");
//display museum details
setDetail(selectedMuseum);
}
@SuppressLint("SetTextI18n")
void setDetail(String s){
switch (s){
case "Louvre":
//set title
((TextView)findViewById(R.id.museumTitle)).setText(s);
//set image
((ImageView)findViewById(R.id.museumImage)).setImageResource(R.drawable.louvre);
//Set text
((TextView)findViewById(R.id.museumDesc)).setText("The museum opened on 10 August 1793 with an exhibition of 537 paintings, the majority of the works being royal and confiscated church property. Because of structural problems with the building, the museum was closed in 1796 until 1801. The collection was increased under Napoleon and the museum was renamed Musée Napoléon, but after Napoleon's abdication, many works seized by his armies were returned to their original owners. The collection was further increased during the reigns of Louis XVIII and Charles X, and during the Second French Empire the museum gained 20,000 pieces. Holdings have grown steadily through donations and bequests since the Third Republic. The collection is divided among eight curatorial departments: Egyptian Antiquities; Near Eastern Antiquities; Greek, Etruscan, and Roman Antiquities; Islamic Art; Sculpture; Decorative Arts; Paintings; Prints and Drawings.");
break;
case "National Museum of China":
((TextView)findViewById(R.id.museumTitle)).setText(s);
((ImageView)findViewById(R.id.museumImage)).setImageResource(R.drawable.china_museum);
((TextView)findViewById(R.id.museumDesc)).setText("The museum was established in 2003 by the merging of the two separate museums that had occupied the same building since 1959: the Museum of the Chinese Revolution in the northern wing (originating in the Office of the National Museum of the Revolution founded in 1950 to preserve the legacy of the 1949 revolution) and the National Museum of Chinese History in the southern wing (with origins in both the Beijing National History Museum, founded in 1949, and the Preliminary Office of the National History Museum, founded in 1912, tasked to safeguard China's larger historical legacy).\n" +
"\n" +
"The building was completed in 1959 as one of the Ten Great Buildings celebrating the ten-year anniversary of the founding of the People's Republic of China. It complements the opposing Great Hall of the People that was built at the same time. The structure sits on 6.5 hectares (16 acres) and has a frontal length of 313 metres (1,027 ft), a height of four stories totaling 40 metres (130 ft), and a width of 149 metres (489 ft). The front displays ten square pillars at its center.");
break;
case "Vatican Museums":
((TextView)findViewById(R.id.museumTitle)).setText(s);
((ImageView)findViewById(R.id.museumImage)).setImageResource(R.drawable.vatican_museums);
((TextView)findViewById(R.id.museumDesc)).setText("The Vatican Museums trace their origin to one marble sculpture, purchased in the 16th century: Laocoön and His Sons was discovered on 14 January 1506, in a vineyard near the basilica of Santa Maria Maggiore in Rome. Pope Julius II sent Giuliano da Sangallo and Michelangelo Buonarroti, who were working at the Vatican, to examine the discovery. On their recommendation, the pope immediately purchased the sculpture from the vineyard owner. The pope put the sculpture, which depicts the Trojan priest Laocoön and his two sons being attacked by giant serpents, on public display at the Vatican exactly one month after its discovery.\n" +
"\n" +
"Benedict XIV founded the Museum Christianum, and some of the Vatican collections formed the Lateran Museum, which Pius IX founded by decree in 1854.\n" +
"\n" +
"The Museums celebrated their 500th anniversary in October 2006 by permanently opening the excavations of a Vatican Hill necropolis to the public.\n" +
"\n" +
"On 1 January 2017, Barbara Jatta became the Director of the Vatican Museums, replacing Antonio Paolucci who had been director since 2007.");
break;
case "Metropolitan Museum of Art":
((TextView)findViewById(R.id.museumTitle)).setText(s);
((ImageView)findViewById(R.id.museumImage)).setImageResource(R.drawable.metropolitan_museum);
((TextView)findViewById(R.id.museumDesc)).setText("The main building at 1000 Fifth Avenue, along the Museum Mile on the eastern edge of Central Park in Manhattan's Upper East Side, is by area one of the world's largest art galleries. A much smaller second location, The Cloisters at Fort Tryon Park in Upper Manhattan, contains an extensive collection of art, architecture, and artifacts from medieval Europe.\n" +
"\n" +
"The permanent collection consists of works of art from classical antiquity and ancient Egypt, paintings, and sculptures from nearly all the European masters, and an extensive collection of American and modern art. The Met maintains extensive holdings of African, Asian, Oceanian, Byzantine, and Islamic art. The museum is home to encyclopedic collections of musical instruments, costumes, and accessories, as well as antique weapons and armor from around the world. Several notable interiors, ranging from 1st-century Rome through modern American design, are installed in its galleries.\n" +
"\n" +
"The Metropolitan Museum of Art was founded in 1870 for the purposes of opening a museum to bring art and art education to the American people. The Fifth Avenue building opened on February 20, 1872, at 681 Fifth Avenue. In 2020, due to the COVID-19 pandemic it was closed for 202 days, and attracted only 1,124,759 visitors, a drop of 83 percent from 2019, but it still ranked ninth on the list of most-visited art museums in the world.");
break;
case "British Museum":
((TextView)findViewById(R.id.museumTitle)).setText(s);
((ImageView)findViewById(R.id.museumImage)).setImageResource(R.drawable.british_museum);
((TextView)findViewById(R.id.museumDesc)).setText(" It documents the story of human culture from its beginnings to the present. It was the first public national museum in the world. The Museum was established in 1753, largely based on the collections of the Irish physician and scientist Sir Hans Sloane.[5] It first opened to the public in 1759, in Montagu House, on the site of the current building. Its expansion over the following 250 years was largely a result of expanding British colonisation and has resulted in the creation of several branch institutions, the first being the Natural History Museum in 1881.\n" +
"\n" +
"In 1973, the British Library Act 1972 detached the library department from the British Museum, but it continued to host the now separated British Library in the same Reading Room and building as the museum until 1997. The museum is a non-departmental public body sponsored by the Department for Digital, Culture, Media and Sport, and as with all national museums in the UK it charges no admission fee, except for loan exhibitions.\n" +
"\n" +
"Its ownership of some of its most famous objects originating in other countries is disputed and remains the subject of international controversy, most notably in the case of the Elgin Marbles of Greece, and the Rosetta Stone of Egypt.");
break;
case "Tate Modern":
((TextView)findViewById(R.id.museumTitle)).setText(s);
((ImageView)findViewById(R.id.museumImage)).setImageResource(R.drawable.tate_museum);
((TextView)findViewById(R.id.museumDesc)).setText("Tate Modern is one of the largest museums of modern and contemporary art in the world. As with the UK's other national galleries and museums, there is no admission charge for access to the collection displays, which take up the majority of the gallery space, whereas tickets must be purchased for the major temporary exhibitions. Due to the COVID-19 pandemic the museum was closed for 173 days in 2020, and attendance plunged by 77 percent to 1,432,991 in 2020. Nonetheless, the Tate was third in the list of most-visited art museums in the world in 2020,[4] and the most visited in Britain.[5] The nearest railway and London Underground station is Blackfriars, which is 0.5 km from the gallery.");
break;
case "National Gallery":
((TextView)findViewById(R.id.museumTitle)).setText(s);
((ImageView)findViewById(R.id.museumImage)).setImageResource(R.drawable.national_gallery);
((TextView)findViewById(R.id.museumDesc)).setText("The Gallery is an exempt charity, and a non-departmental public body of the Department for Digital, Culture, Media and Sport.[3] Its collection belongs to the government on behalf of the British public, and entry to the main collection is free of charge. In 2020, due to the COVID-19 pandemic it attracted only 1,197,143 visitors, a drop of 50 percent from 2019, but it still ranked eighth on the list of most-visited art museums in the world. [4]\n" +
"\n" +
"Unlike comparable museums in continental Europe, the National Gallery was not formed by nationalising an existing royal or princely art collection. It came into being when the British government bought 38 paintings from the heirs of John Julius Angerstein in 1824. After that initial purchase the Gallery was shaped mainly by its early directors, especially Sir Charles Lock Eastlake, and by private donations, which now account for two-thirds of the collection.[5] The collection is smaller than many European national galleries, but encyclopaedic in scope; most major developments in Western painting \"from Giotto to Cézanne\"[6] are represented with important works. It used to be claimed that this was one of the few national galleries that had all its works on permanent exhibition,[7] but this is no longer the case.\n" +
"\n" +
"The present building, the third to house the National Gallery, was designed by William Wilkins from 1832 to 1838. Only the facade onto Trafalgar Square remains essentially unchanged from this time, as the building has been expanded piecemeal throughout its history. Wilkins's building was often criticised for the perceived weaknesses of its design and for its lack of space; the latter problem led to the establishment of the Tate Gallery for British art in 1897.\n" +
"\n" +
"The Sainsbury Wing, a 1991 extension to the west by Robert Venturi and Denise Scott Brown, is a significant example of Postmodernist architecture in Britain. The current Director of the National Gallery is Gabriele Finaldi.");
break;
case "Natural History Museum":
((TextView)findViewById(R.id.museumTitle)).setText(s);
((ImageView)findViewById(R.id.museumImage)).setImageResource(R.drawable.history_museum);
((TextView)findViewById(R.id.museumDesc)).setText("The museum is home to life and earth science specimens comprising some 80 million items within five main collections: botany, entomology, mineralogy, palaeontology and zoology. The museum is a centre of research specialising in taxonomy, identification and conservation. Given the age of the institution, many of the collections have great historical as well as scientific value, such as specimens collected by Charles Darwin. The museum is particularly famous for its exhibition of dinosaur skeletons and ornate architecture—sometimes dubbed a cathedral of nature—both exemplified by the large Diplodocus cast that dominated the vaulted central hall before it was replaced in 2017 with the skeleton of a blue whale hanging from the ceiling. The Natural History Museum Library contains extensive books, journals, manuscripts, and artwork collections linked to the work and research of the scientific departments; access to the library is by appointment only. The museum is recognised as the pre-eminent centre of natural history and research of related fields in the world.\n" +
"\n" +
"Although commonly referred to as the Natural History Museum, it was officially known as British Museum (Natural History) until 1992, despite legal separation from the British Museum itself in 1963. Originating from collections within the British Museum, the landmark Alfred Waterhouse building was built and opened by 1881 and later incorporated the Geological Museum. The Darwin Centre is a more recent addition, partly designed as a modern facility for storing the valuable collections.\n" +
"\n" +
"Like other publicly funded national museums in the United Kingdom, the Natural History Museum does not charge an admission fee.[2] The museum is an exempt charity and a non-departmental public body sponsored by the Department for Digital, Culture, Media and Sport.[3] Catherine, Duchess of Cambridge, is a patron of the museum.[4] There are approximately 850 staff at the museum. The two largest strategic groups are the Public Engagement Group and Science Group.");
break;
case "American Museum of Natural History":
((TextView)findViewById(R.id.museumTitle)).setText(s);
((ImageView)findViewById(R.id.museumImage)).setImageResource(R.drawable.american_museum);
((TextView)findViewById(R.id.museumDesc)).setText("Before the construction of the present complex, the museum was housed in the Arsenal building in Central Park. Theodore Roosevelt, Sr., the father of Theodore Roosevelt, the 26th U.S. president, was one of the founders along with John David Wolfe, William T. Blodgett, Robert L. Stuart, Andrew H. Green, Robert Colgate, Morris K. Jesup, Benjamin H. Field, D. Jackson Steward, Richard M. Blatchford, J. P. Morgan, Adrian Iselin, Moses H. Grinnell, Benjamin B. Sherman, A. G. Phelps Dodge, William A. Haines, Charles A. Dana, Joseph H. Choate, Henry G. Stebbins, Henry Parish, and Howard Potter. The founding of the museum realized the dream of naturalist Dr. Albert S. Bickmore. Bickmore, a one-time student of zoologist Louis Agassiz, lobbied tirelessly for years for the establishment of a natural history museum in New York. His proposal, backed by his powerful sponsors, won the support of the Governor of New York, John Thompson Hoffman, who signed a bill officially creating the American Museum of Natural History on April 6, 1869.\n" +
"\n" +
"This building was built in 1874 and opened in 1877. Currently, this building houses (first floor to fourth floor) the Hall of Northwest Coast Indians, Hall of African Peoples, the Sanford Hall of North American Birds, and Hall of Vertebrate Origins.\n" +
"In 1874, the cornerstone was laid for the museum's first building, which is now hidden from view by the many buildings in the complex that today occupy most of Manhattan Square. The original Victorian Gothic building, which was opened in 1877, was designed by Calvert Vaux and J. Wrey Mould, both already closely identified with the architecture of Central Park.");
break;
case "State Hermitage Museum":
((TextView)findViewById(R.id.museumTitle)).setText(s);
((ImageView)findViewById(R.id.museumImage)).setImageResource(R.drawable.hermitage_museum);
((TextView)findViewById(R.id.museumDesc)).setText("The museum celebrates the anniversary of its founding each year on 7 December, Saint Catherine's Day. It has been open to the public since 1852. It attracted 968,604 visitors in 2020, a drop of eighty percent from 2019, due to the Covid-19 pandemic. In 2020 it ranked eleventh on the List of most visited art museums in the world.\n" +
"\n" +
"Its collections, of which only a small part is on permanent display, comprise over three million items (the numismatic collection accounts for about one-third of them), including the largest collection of paintings in the world.[citation needed] The collections occupy a large complex of six historic buildings along Palace Embankment, including the Winter Palace, a former residence of Russian emperors. Apart from them, the Menshikov Palace, Museum of Porcelain, Storage Facility at Staraya Derevnya, and the eastern wing of the General Staff Building are also part of the museum. The museum has several exhibition centers abroad. The Hermitage is a federal state property. Since July 1992, the director of the museum has been Mikhail Piotrovsky.\n" +
"\n" +
"Of the six buildings in the main museum complex, five—namely the Winter Palace, Small Hermitage, Old Hermitage, New Hermitage, and Hermitage Theatre—are open to the public. The entrance ticket for foreign tourists costs more than the fee paid by citizens of Russia and Belarus. However, entrance is free of charge the third Thursday of every month for all visitors, and free daily for students and children. The museum is closed on Mondays. The entrance for individual visitors is located in the Winter Palace, accessible from the Courtyard.");
break;
default:
((TextView)findViewById(R.id.museumDesc)).setText("Not added yet");
break;
}
}
public void goToList(View v){
Intent intent = new Intent(this, MainPage.class);
intent.putExtra("name", username);
startActivity(intent);
}
public void goToBooking(View v){
Intent intent = new Intent(this, Booking_page.class);
intent.putExtras(bundle);
startActivity(intent);
}
}
\ No newline at end of file
package com.example.museumapp;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
public class PaymentPage extends AppCompatActivity {
Bundle dataBundle;
int total;
int payment;
int change = 0;
boolean isPayed = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_payment_page);
//get bundle
dataBundle = getIntent().getExtras();
//user name
String userName = dataBundle.getString("name");
//museum name
String museumName = dataBundle.getString("selectedMuseum");
//museum fee
int museumFee = dataBundle.getInt("fee");
//date
String date = dataBundle.getString("date");
//time
String time = dataBundle.getString("time");
//refreshment
String refreshmentName = dataBundle.getString("refreshmentName");
int refreshmentPrice = dataBundle.getInt("refreshmentPrice");
//souvenir
String souvenirName = dataBundle.getString("souvenirName");
int souvenirPrice = dataBundle.getInt("souvenirPrice");
//total cost
total = dataBundle.getInt("total");
//display amount to pay
TextView toPayView = (TextView)findViewById(R.id.totalAmountTxt);
toPayView.setText("£" + String.valueOf(total));
//get views
TextView usernameView = (TextView)findViewById(R.id.payName);
TextView museumView = (TextView)findViewById(R.id.payMuseum);
TextView museumFeeView = (TextView)findViewById(R.id.payMuseumFee);
TextView dateView = (TextView)findViewById(R.id.payDate);
TextView timeView = (TextView)findViewById(R.id.payTime);
TextView refreshmentView = (TextView)findViewById(R.id.payRefreshment);
TextView refreshmentPriceView = (TextView)findViewById(R.id.payRefrPrice);
TextView souvenirView = (TextView)findViewById(R.id.paySouvenir);
TextView souvenirPriceView = (TextView)findViewById(R.id.paySouvPrice);
TextView totalView = (TextView)findViewById(R.id.payTotal);
//set up receipt
usernameView.setText(userName);
museumView.setText(museumName);
museumFeeView.setText("£" + museumFee);
dateView.setText(date);
timeView.setText(time);
refreshmentView.setText(refreshmentName);
refreshmentPriceView.setText("£" + refreshmentPrice);
souvenirView.setText(souvenirName);
souvenirPriceView.setText("£" + souvenirPrice);
totalView.setText("£" + (total));
}
public void displayReceipt(View v){
//get payment
EditText paymentView = (EditText)findViewById(R.id.paymentTxt);
String paymentString = paymentView.getText().toString();
payment = Integer.parseInt(paymentString);
//set payment on receipt
TextView receiptPaymentView = (TextView)findViewById(R.id.payPayment);
receiptPaymentView.setText("£" + String.valueOf(payment));
//calculate change
if(payment >= total){
change = payment - total;
isPayed = true;
//set change on receipt
TextView changeView = (TextView)findViewById(R.id.payChange);
changeView.setText("£" + String.valueOf(change));
//get receipt after payment
findViewById(R.id.receiptTable).setVisibility(View.VISIBLE);
}
else{
AlertDialog.Builder alert = new AlertDialog.Builder(PaymentPage.this);
alert.setTitle("Payment issue");
alert.setMessage("Enter an amount at list equal to the price of your booking.");
alert.setPositiveButton(
"OK", new DialogInterface.OnClickListener(){
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
}
);
AlertDialog alertCreate = alert.create();
alertCreate.show();
}
}
//next
public void goToConfirmation(View v){
if(isPayed){
Intent intent = new Intent(this, ConfirmationPage.class);
startActivity(intent);
}
else{
AlertDialog.Builder alert = new AlertDialog.Builder(PaymentPage.this);
alert.setTitle("Not payed!");
alert.setMessage("Yuu need to pay first.");
alert.setPositiveButton(
"OK", new DialogInterface.OnClickListener(){
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
}
);
AlertDialog alertCreate = alert.create();
alertCreate.show();
}
}
//back
public void goToSummary(View v){
Intent intent = new Intent(this, SummaryPage.class);
intent.putExtras(dataBundle);
startActivity(intent);
}
}
\ No newline at end of file
package com.example.museumapp;
public class Refreshment {
String name;
int cost, quantity, image;
public Refreshment(String name, int cost, int quantity, int image) {
this.name = name;
this.cost = cost;
this.quantity = quantity;
this.image = image;
}
}
package com.example.museumapp;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;
public class RegistrationPage extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_registration_page);
}
public void registerSubmitFn(View v){
myDBConnector dbHandler = new myDBConnector(this, null, null, 1);
//take values from text field
EditText nameView = (EditText) findViewById(R.id.nameTxt);
EditText surnameView = (EditText) findViewById(R.id.surnameTxt);
EditText usernameView = (EditText) findViewById(R.id.usernameTxt);
EditText passwordView = (EditText) findViewById(R.id.passwordTxt);
String name = nameView.getText().toString();
String surname = surnameView.getText().toString();
String username = usernameView.getText().toString();
String password = passwordView.getText().toString();
//check for empty fields
if( name.isEmpty() || surname.isEmpty() || username.isEmpty() || password.isEmpty() ){
AlertDialog.Builder buildAlert = new AlertDialog.Builder(RegistrationPage.this);
buildAlert.setTitle("Empty field");
buildAlert.setMessage("All the fields are mandatory. Make sure to enter the required details.");
buildAlert.setPositiveButton("OK", new DialogInterface.OnClickListener(){
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
}
);
AlertDialog alertCreate = buildAlert.create();
alertCreate.show();
}
else {
//add user details to db
dbHandler.addNewUser( name,
surname,
username,
password
);
//check if user was created
if( (dbHandler.getUserName(username)).equals(name) ){
//open login page
goToLogin(v);
//after a successful registration
Toast toast = Toast.makeText(getApplicationContext(), "Successfully registered, login to use the app!", Toast.LENGTH_LONG);
//toast position
//toast.setGravity(Gravity.TOP|Gravity.LEFT, 20,30);
toast.show();
}
}
}
public void clear(View v){
EditText nameView = (EditText) findViewById(R.id.nameTxt);
EditText surnameView = (EditText) findViewById(R.id.surnameTxt);
EditText usernameView = (EditText) findViewById(R.id.usernameTxt);
EditText passwordView = (EditText) findViewById(R.id.passwordTxt);
nameView.setText("");
surnameView.setText("");
usernameView.setText("");
passwordView.setText("");
}
public void goToLogin(View v){
Intent intent = new Intent(this, LoginPage.class);
startActivity(intent);
}
}
\ No newline at end of file
package com.example.museumapp;
public class SelectedItem {
String name;
int quantity, price;
public SelectedItem(String name, int quantity, int price) {
this.name = name;
this.quantity = quantity;
this.price = price;
}
}
package com.example.museumapp;
import android.content.Context;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.cardview.widget.CardView;
import androidx.core.content.ContextCompat;
import java.util.ArrayList;
import java.util.List;
public class ShopAdapter extends ArrayAdapter<Souvenir> {
public List<Souvenir> selectedSouvenirs;
String selectedSouvenirName;
int selectedSouvenirQty, selectedSouvenirPrice;
int q = 0;
Souvenir lastSelected;
int lastSelectedPosition, selectedPosition;
TextView lastSelectedQty;
public ShopAdapter(@NonNull Context context, ArrayList<Souvenir> shopList) {
super(context, 0, shopList);
}
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
if (convertView == null) {
// Layout Inflater inflates each item to be displayed in GridView.
convertView = LayoutInflater.from(getContext()).inflate(R.layout.shop_card, parent, false);
}
Souvenir item = getItem(position);
//get views
TextView nameView = convertView.findViewById(R.id.itemNameTxt);
TextView priceView = convertView.findViewById(R.id.itemPriceTxt);
TextView quantityView = convertView.findViewById(R.id.quantityTxt);
ImageView imageView = convertView.findViewById(R.id.itemImage);
ImageView plus = convertView.findViewById(R.id.plusShop);
ImageView minus = convertView.findViewById(R.id.minusShop);
CardView card = convertView.findViewById(R.id.shopCardView);
//set views
nameView.setText(item.getName());
priceView.setText("£" + item.getPrice());
quantityView.setText(String.valueOf(item.getQuantity()));
imageView.setImageResource(item.getImage());
selectedSouvenirs = new ArrayList<>();
//click listener for plus
plus.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
q = item.getQuantity();
q = q + 1 ;
int c = q * item.getPrice();
quantityView.setText(String.valueOf(q));
item.setQuantity(q);
//store selection
selectedPosition = position;
selectedSouvenirName = item.getName();
selectedSouvenirQty = q;
selectedSouvenirPrice = c;
if(selectedPosition != lastSelectedPosition){
lastSelectedQty.setText("0");
lastSelected.setQuantity(0);
}
lastSelected = item;
lastSelectedPosition = position;
lastSelectedQty = quantityView;
}
});
//click listener for minus
minus.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if(q > 0){
q = item.getQuantity();
q = q - 1 ;
item.setQuantity(q);
quantityView.setText(String.valueOf(q));
selectedSouvenirQty = q;
}
if( q == 0){
card.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.lightBrownProj));
selectedSouvenirName = null;
selectedSouvenirQty = 0;
selectedSouvenirPrice = 0;
}
}
});
return convertView;
}
}
package com.example.museumapp;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.GridView;
import java.util.ArrayList;
public class ShopPage extends AppCompatActivity {
Bundle shopBundle;
ShopAdapter shopAdapter;
ArrayList<Souvenir> shopList;
GridView shopGV;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_shop_page);
//get bundle
shopBundle = getIntent().getExtras();
//shop items
shopList = new ArrayList<>();
shopList.add(new Souvenir(R.drawable.tshirt, 10, 0, "T-shirt"));
shopList.add(new Souvenir(R.drawable.hat, 5, 0, "Hat"));
shopList.add(new Souvenir(R.drawable.snow_globe, 5, 0, "Snow globe"));
shopList.add(new Souvenir(R.drawable.keychain, 5, 0, "Key chain"));
shopList.add(new Souvenir(R.drawable.bottlesouvenir, 5, 0, "Bottle"));
shopList.add(new Souvenir(R.drawable.mug, 5, 0, "Mug"));
shopList.add(new Souvenir(R.drawable.coaster, 2, 0, "Coaster"));
//setup grid view
shopGV = findViewById(R.id.shopGV);
shopAdapter = new ShopAdapter(this, shopList);
shopGV.setAdapter(shopAdapter);
}
//next
public void goToSummary(View v){
Intent intent = new Intent(this, SummaryPage.class);
intent.putExtra("souvenirName", shopAdapter.selectedSouvenirName);
intent.putExtra("souvenirQty", shopAdapter.selectedSouvenirQty);
intent.putExtra("souvenirPrice", shopAdapter.selectedSouvenirPrice);
intent.putExtras(shopBundle);
startActivity(intent);
}
//previous
public void goToCafe(View v){
Intent intent = new Intent(this, CafePage.class);
intent.putExtras(shopBundle);
startActivity(intent);
}
}
\ No newline at end of file
package com.example.museumapp;
public class Slot {
String time;
Slot(String time){
this.time = time;
}
public String getTime(){
return time;
}
}
package com.example.museumapp;
public class Souvenir {
int image, price, quantity;
String name;
public Souvenir(int image, int price, int quantity, String name) {
this.image = image;
this.price = price;
this.quantity = quantity;
this.name = name;
}
public int getImage() {
return image;
}
public int getPrice() {
return price;
}
public int getQuantity() {
return quantity;
}
public String getName() {
return name;
}
public void setImage(int image) {
this.image = image;
}
public void setPrice(int price) {
this.price = price;
}
public void setQuantity(int quantity) {
this.quantity = quantity;
}
public void setName(String name) {
this.name = name;
}
}
package com.example.museumapp;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
public class SummaryAdapter extends RecyclerView.Adapter<SummaryAdapter.ViewHolder> {
private List<SummaryItem> summaryList;
private LayoutInflater inflater;
SummaryAdapter(Context context, List<SummaryItem> summaryList) {
this.inflater = LayoutInflater.from(context);
this.summaryList = summaryList;
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = inflater.inflate(R.layout.summary_row, parent, false);
return new ViewHolder(view);
}
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
String name = summaryList.get(position).name;
int quantity = summaryList.get(position).quantity;
int price = summaryList.get(position).price;
holder.nameTextView.setText(name + " x" + quantity + " ");
holder.priceTextView.setText("£ " + price);
}
//get the number of the items
@Override
public int getItemCount() {
return summaryList.size();
}
public class ViewHolder extends RecyclerView.ViewHolder {
TextView nameTextView;
TextView priceTextView;
ViewHolder(View v) {
super(v);
nameTextView = itemView.findViewById(R.id.nameSummaryTxt);
priceTextView = itemView.findViewById(R.id.priceSummaryTxt);
}
}
}
package com.example.museumapp;
public class SummaryItem {
String name;
int quantity, price;
public SummaryItem(String name, int quantity, int price) {
this.name = name;
this.quantity = quantity;
this.price = price;
}
}
package com.example.museumapp;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import java.util.ArrayList;
import java.util.List;
public class SummaryPage extends AppCompatActivity {
Bundle summaryBundle;
SummaryAdapter adapterObj;
ArrayList<SummaryItem> summaryList;
RecyclerView recyclerObj;
int total;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_summary_page);
//get bundle
summaryBundle = getIntent().getExtras();
//museum details
String museumName = summaryBundle.getString("selectedMuseum");
int feeMuseum = summaryBundle.getInt("fee");
//refreshment details
String refreshmentName = summaryBundle.getString("refreshmentName");
int refreshmentQty = summaryBundle.getInt("refreshmentQty");
int refreshmentPrice = summaryBundle.getInt("refreshmentPrice");
//souvenir details
String souvenirName = summaryBundle.getString("souvenirName");
int souvenirQty = summaryBundle.getInt("souvenirQty");
int souvenirPrice = summaryBundle.getInt("souvenirPrice");
total = feeMuseum + refreshmentPrice + souvenirPrice;
summaryList = new ArrayList<>();
summaryList.add(new SummaryItem(museumName, 1, feeMuseum));
summaryList.add(new SummaryItem(refreshmentName, refreshmentQty, refreshmentPrice));
summaryList.add(new SummaryItem(souvenirName, souvenirQty, souvenirPrice));
//set up RecyclerView
recyclerObj = findViewById(R.id.summaryRecyclerView);
recyclerObj.setLayoutManager(new LinearLayoutManager(this));
adapterObj = new SummaryAdapter(this, summaryList);
recyclerObj.setAdapter(adapterObj);
TextView totalView = findViewById(R.id.totalSummary);
totalView.setText("£" + total + " ");
}
//back
public void goToShopPage(View v){
Intent intent = new Intent(this, ShopPage.class);
intent.putExtras(summaryBundle);
startActivity(intent);
}
//next
public void goToPayment(View v){
Intent intent = new Intent(this, PaymentPage.class);
intent.putExtras(summaryBundle);
intent.putExtra("total", total);
startActivity(intent);
}
}
\ No newline at end of file
package com.example.museumapp;
import android.content.Context;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import java.util.ArrayList;
public class TimeSlotAdapter extends ArrayAdapter<Slot> {
//adapted from https://www.geeksforgeeks.org/gridview-in-android-with-example/
String selectedTime = null;
int lastPosition = -1;
TextView lastSelected;
String lastTime;
public TimeSlotAdapter(@NonNull Context context, ArrayList<Slot> slotList) {
super(context, 0, slotList);
}
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
View timeView = convertView;
if (timeView == null) {
// Layout Inflater inflates each item to be displayed in GridView.
timeView = LayoutInflater.from(getContext()).inflate(R.layout.time_slot, parent, false);
}
Slot timeSlot = getItem(position);
TextView timeSlotView = timeView.findViewById(R.id.timeSlotTxt);
timeSlotView.setText(timeSlot.getTime());
timeSlotView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
timeSlotView.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.brownPecanProj));
timeSlotView.setTextColor(Color.WHITE);
selectedTime = timeSlot.getTime();
if(lastPosition != -1){
lastSelected.setSelected(false);
lastSelected.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.lightBrownProj));
lastSelected.setTextColor(ContextCompat.getColor(getContext(), R.color.brownPecanProj));
}
if(lastTime==selectedTime){
selectedTime = null;
}
lastSelected = timeSlotView;
lastTime = lastSelected.getText().toString();
lastPosition = position;
}
});
return timeView;
}
}
package com.example.museumapp;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
public class adapter extends RecyclerView.Adapter<adapter.ViewHolder> {
private List<Museum> museumsList;
private LayoutInflater inflater;
//constructor
adapter(Context context, List<Museum> museumsList){
this.inflater = LayoutInflater.from(context);
this.museumsList = museumsList;
}
//inflate row from xml when needed
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = inflater.inflate(R.layout.row_item, parent, false);
return new ViewHolder(view);
}
//bind data to textView in the custom view
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
String name = museumsList.get(position).name;
String desc = museumsList.get(position).description;
String cit = museumsList.get(position).city;
String co = museumsList.get(position).country;
int price = museumsList.get(position).fee;
String username = museumsList.get(position).UserName;
holder.myTextView.setText(name);
holder.myDescView.setText(desc + "\n\n" + cit + ", " + co + " £" + price );
MainPage main = new MainPage();
//click listener for title
holder.myTextView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//open museum page
Intent intent = new Intent (v.getContext(), MuseumPage.class);
intent.putExtra("name", username);
intent.putExtra("selectedMuseum", museumsList.get(position).name);
intent.putExtra("fee", museumsList.get(position).fee);
v.getContext().startActivity(intent);
}
});
}
//get the number of the items
@Override
public int getItemCount() {
return museumsList.size();
}
//create and retrieve data when user scroll
public class ViewHolder extends RecyclerView.ViewHolder {
TextView myTextView;
TextView myDescView;
ViewHolder(View v) {
super(v);
myTextView = itemView.findViewById(R.id.itemText);
myDescView = itemView.findViewById(R.id.textViewDesc);
}
}
}
package com.example.museumapp;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import androidx.annotation.Nullable;
public class myDBConnector extends SQLiteOpenHelper {
//database structure
private static final int DB_VERSION = 1;
private static final String DB_NAME = "Museum.db";
private static final String TABLE_Users = "Users";
private static final String COLUMN_ID = "UsersID";
private static final String COLUMN_Name = "Name";
private static final String COLUMN_Surname = "Surname";
private static final String COLUMN_Username = "Username";
private static final String COLUMN_Password = "Password";
//constructor
public myDBConnector(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version) {
super(context, DB_NAME, factory, DB_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
//create the table
String CREATE_table = "CREATE TABLE " +
TABLE_Users + "(" +
COLUMN_ID + " INTEGER PRIMARY KEY," +
COLUMN_Name + " TEXT," +
COLUMN_Surname + " TEXT," +
COLUMN_Username + " TEXT," +
COLUMN_Password + " TEXT" + ")";
db.execSQL(CREATE_table);
}
//not implemented
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
}
public void addNewUser(String name, String surname, String username, String password ){
ContentValues row = new ContentValues();
row.put(COLUMN_Name, name);
row.put(COLUMN_Surname, surname);
row.put(COLUMN_Username, username);
row.put(COLUMN_Password, password);
SQLiteDatabase db = this.getWritableDatabase();
db.insert(TABLE_Users, null, row);
db.close();
}
public boolean checkLogin(String username, String password){
boolean result = false;
//query that selects the user from the table
String query = "SELECT * FROM " + TABLE_Users +
" WHERE " + COLUMN_Username + " = \"" + username + "\"";
//bind database
SQLiteDatabase db = this.getWritableDatabase();
//execute query
Cursor cursor = db.rawQuery(query, null);
//check the first element returned
if(cursor.moveToFirst()){
if(cursor.getString(4).equals(password) ){
result = true;
}
}
else{
result = false;
}
//close db
cursor.close();
db.close();
return result;
}
public String findUser(String username){
String s = null;
//query that selects the user from the database
String query = "SELECT * FROM " + TABLE_Users +
" WHERE " + COLUMN_Username + " = \"" + username + "\"";
//access to the database
SQLiteDatabase db = this.getWritableDatabase();
//execute query
Cursor cursor = db.rawQuery(query, null);
if(cursor.moveToFirst()){
s = Integer.parseInt(cursor.getString(0)) +
cursor.getString(1) +
cursor.getString(2) +
cursor.getString(3) +
cursor.getString(4);
}
//close db
cursor.close();
db.close();
return s;
}
public String getUserName(String username){
String s = null;
//query that selects the user from the database
String query = "SELECT name FROM " + TABLE_Users +
" WHERE " + COLUMN_Username + " = \"" + username + "\"";
//access to the database
SQLiteDatabase db = this.getWritableDatabase();
//execute query
Cursor cursor = db.rawQuery(query, null);
if(cursor.moveToFirst()){
s = cursor.getString(0);
}
//close db
cursor.close();
db.close();
return s;
}
}//end of class myDBConnector
<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
<?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>
<?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"
android:background="@color/lightBrownProj"
tools:context=".Booking_page">
<TextView
android:id="@+id/bookingTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center_horizontal"
android:text="Booking"
android:textSize="14pt"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="300dp"
android:layout_height="12dp"
android:layout_marginTop="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/bookingTitle" />
<EditText
android:id="@+id/editTextDate"
android:layout_width="205dp"
android:layout_height="55dp"
android:layout_marginStart="20dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:ems="10"
android:inputType="date"
android:textSize="11pt"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView10" />
<TextView
android:id="@+id/textView10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:layout_marginRight="20dp"
android:text="Enter a day:"
android:textSize="11pt"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.071"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressBar" />
<TextView
android:id="@+id/textView13"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="20dp"
android:layout_marginRight="20dp"
android:text="Select a time slot"
android:textSize="11pt"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextDate" />
<Button
android:id="@+id/button7"
android:layout_width="127dp"
android:layout_height="64dp"
android:layout_below="@+id/museumDesc"
android:layout_marginTop="20dp"
android:layout_marginEnd="40dp"
android:layout_marginRight="40dp"
android:layout_toEndOf="@+id/button3"
android:layout_toRightOf="@+id/button3"
android:onClick="goToCafePage"
android:text="@string/next"
android:textSize="9pt"
app:backgroundTint="@color/greenProj"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/timeGridView" />
<Button
android:id="@+id/button8"
android:layout_width="127dp"
android:layout_height="64dp"
android:layout_below="@+id/museumDesc"
android:layout_marginStart="40dp"
android:layout_marginLeft="40dp"
android:layout_marginTop="20dp"
android:layout_toEndOf="@+id/button3"
android:layout_toRightOf="@+id/button3"
android:onClick="goToMuseumPage"
android:text="@string/back"
android:textSize="9pt"
app:backgroundTint="@color/redProj"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/timeGridView" />
<Button
android:id="@+id/calendarBtn"
android:layout_width="126dp"
android:layout_height="55dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:layout_marginRight="20dp"
android:text="calendar"
app:backgroundTint="@color/lightBrownProj"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView10" />
<GridView
android:id="@+id/timeGridView"
android:layout_width="281dp"
android:layout_height="160dp"
android:layout_marginTop="16dp"
android:horizontalSpacing="6dp"
android:numColumns="2"
android:verticalSpacing="6dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView13" />
</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"
android:background="@color/lightBrownProj"
tools:context=".CafePage">
<TextView
android:id="@+id/bookingTitle2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center_horizontal"
android:text="Booking"
android:textSize="14pt"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/button9"
android:layout_width="127dp"
android:layout_height="64dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="40dp"
android:layout_marginRight="40dp"
android:onClick="goToShop"
android:text="@string/next"
android:textSize="9pt"
app:backgroundTint="@color/greenProj"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cafeRecycler" />
<ProgressBar
android:id="@+id/progressBar2"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="300dp"
android:layout_height="12dp"
android:layout_marginTop="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.531"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/bookingTitle2" />
<TextView
android:id="@+id/textView15"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:layout_marginRight="20dp"
android:text="Add a refreshment"
android:textSize="11pt"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressBar2" />
<Button
android:id="@+id/button11"
android:layout_width="127dp"
android:layout_height="64dp"
android:layout_marginStart="40dp"
android:layout_marginLeft="40dp"
android:layout_marginTop="20dp"
android:onClick="goToBookingPage"
android:text="@string/back"
android:textSize="9pt"
app:backgroundTint="@color/redProj"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cafeRecycler" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/cafeRecycler"
android:layout_width="fill_parent"
android:layout_height="430dp"
android:layout_marginStart="20dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:layout_marginRight="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView15" />
</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"
android:background="@color/lightBrownProj"
tools:context=".ConfirmationPage">
<TextView
android:id="@+id/orderTitle2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center_horizontal"
android:text="Confirmation"
android:textSize="14pt"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/confirmationTxt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="20dp"
android:layout_marginRight="20dp"
android:gravity="center"
android:text="Thank you for your booking! \n\nTake note of your booking code:"
android:textSize="12pt"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/orderTitle2" />
<Button
android:id="@+id/button15"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:onClick="goToList"
android:paddingLeft="25dp"
android:paddingTop="10dp"
android:paddingRight="25dp"
android:paddingBottom="10dp"
android:text="museum list"
android:textSize="9pt"
app:backgroundTint="@color/lightBrownProj"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/confirmationCodeTxt" />
<TextView
android:id="@+id/confirmationCodeTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:layout_marginRight="20dp"
android:text="TextView"
android:textSize="12pt"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/confirmationTxt" />
</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"
android:background="@color/lightBrownProj"
tools:context=".LoginPage">
<Button
android:id="@+id/loginBtn"
android:layout_width="194dp"
android:layout_height="63dp"
android:layout_marginStart="108dp"
android:layout_marginLeft="108dp"
android:layout_marginTop="20dp"
android:onClick="loginFn"
android:text="@string/login"
android:textSize="9pt"
app:backgroundTint="#02AA48"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout2" />
<Button
android:id="@+id/button6"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="140dp"
android:layout_height="59dp"
android:layout_marginTop="40dp"
android:layout_marginEnd="56dp"
android:layout_marginRight="56dp"
android:onClick="goToRegistration"
android:text="@string/register"
android:textColor="@color/white"
android:textSize="8pt"
app:backgroundTint="@color/lightBrownProj"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView11" />
<TextView
android:id="@+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="136dp"
android:layout_marginLeft="136dp"
android:layout_marginTop="40dp"
android:text="@string/Login"
android:textSize="20pt"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="297dp"
android:layout_height="278dp"
android:layout_marginTop="48dp"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView8">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="116dp"
android:orientation="vertical">
<TextView
android:id="@+id/usernameTextView"
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_weight="1"
android:gravity="center"
android:text="@string/Username"
android:textSize="12pt" />
<EditText
android:id="@+id/usernameLoginTxt"
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_weight="1"
android:ems="10"
android:inputType="textPersonName"
android:textSize="12pt" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="116dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView12"
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_weight="1"
android:gravity="center"
android:text="@string/Password"
android:textSize="12pt" />
<EditText
android:id="@+id/passwordLoginTxt"
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_weight="1"
android:ems="10"
android:inputType="textPassword"
android:textSize="12pt" />
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/textView11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="184dp"
android:layout_marginLeft="184dp"
android:layout_marginTop="8dp"
android:clickable="false"
android:text="@string/Help"
android:textColor="@android:color/darker_gray"
android:textSize="9pt"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/loginBtn" />
</androidx.constraintlayout.widget.ConstraintLayout>
<?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"
android:background="@color/brownPeanutProj"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="126dp"
android:layout_marginTop="32dp"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/registerBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="goToRegistration"
android:paddingLeft="34dp"
android:paddingTop="10dp"
android:paddingRight="34dp"
android:paddingBottom="10dp"
android:text="register"
android:textSize="14pt"
app:backgroundTint="@color/brownPecanProj" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:onClick="goToLogin"
android:text="or Login"
android:textSize="9pt" />
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/textView"
android:layout_width="365dp"
android:layout_height="296dp"
android:gravity="center"
android:text="World Museums"
android:textSize="35pt"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.261" />
</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"
android:background="@color/lightBrownProj"
tools:context=".MainPage">
<TextView
android:id="@+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="28dp"
android:layout_marginLeft="28dp"
android:layout_marginTop="20dp"
android:text="List of museums"
android:textSize="20pt"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/welcomeTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:layout_marginLeft="30dp"
android:layout_marginTop="24dp"
android:text="Select a museum or search:"
android:textSize="12pt"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView9" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerID"
android:layout_width="350dp"
android:layout_height="483dp"
android:layout_marginTop="10dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.492"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/searchTxt" />
<EditText
android:id="@+id/searchTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="18dp"
android:layout_marginLeft="18dp"
android:layout_marginTop="10dp"
android:ems="10"
android:inputType="textPersonName"
android:onClick="deleteText"
android:text="Search museum"
android:textSize="10pt"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/welcomeTxt" />
<Button
android:id="@+id/button16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginLeft="5dp"
android:layout_marginTop="10dp"
android:onClick="searchMuseum"
android:text="serach"
app:backgroundTint="@color/lightBrownProj"
app:layout_constraintStart_toEndOf="@+id/searchTxt"
app:layout_constraintTop_toBottomOf="@+id/welcomeTxt" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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"
android:background="@color/lightBrownProj"
tools:context=".MuseumPage">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/museumTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center_horizontal"
android:text="@string/museum_title"
android:textSize="14pt"
android:textStyle="bold" />
<androidx.cardview.widget.CardView
android:id="@+id/cardImageID"
android:layout_width="match_parent"
android:layout_height="192dp"
android:layout_below="@+id/museumTitle"
android:layout_marginStart="5dp"
android:layout_marginLeft="5dp"
android:layout_marginTop="15dp"
android:layout_marginEnd="5dp"
android:layout_marginRight="5dp"
android:padding="10dp"
app:cardBackgroundColor="@color/lightBrownProj"
app:cardElevation="5dp">
<ImageView
android:id="@+id/museumImage"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:srcCompat="@tools:sample/backgrounds/scenic" />
</androidx.cardview.widget.CardView>
<TextView
android:id="@+id/museumDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/cardImageID"
android:layout_marginStart="20dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="20dp"
android:layout_marginRight="20dp"
android:ems="10"
android:gravity="start|center_horizontal|top"
android:inputType="textMultiLine"
android:textColor="@color/black"
android:textSize="11pt" />
<Button
android:id="@+id/button3"
android:layout_width="127dp"
android:layout_height="64dp"
android:layout_below="@+id/museumDesc"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_marginStart="40dp"
android:layout_marginLeft="40dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:onClick="goToList"
android:text="@string/list_of_museums"
app:backgroundTint="@color/redProj" />
<Button
android:id="@+id/button5"
android:layout_width="127dp"
android:layout_height="64dp"
android:layout_below="@+id/museumDesc"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginTop="20dp"
android:layout_marginEnd="40dp"
android:layout_marginRight="40dp"
android:layout_marginBottom="20dp"
android:onClick="goToBooking"
android:text="@string/book"
android:textSize="9pt"
app:backgroundTint="@color/greenProj" />
</RelativeLayout>
</ScrollView>
\ 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"
android:background="@color/lightBrownProj"
tools:context=".PaymentPage">
<TextView
android:id="@+id/orderTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center_horizontal"
android:text="Payment"
android:textSize="14pt"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ScrollView
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="15dp"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="15dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="30dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/orderTitle"
app:layout_constraintVertical_bias="0.0">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Spinner
android:id="@+id/spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="40dp"
android:layout_marginLeft="40dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/linearLayout4"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/spinner">
<TextView
android:id="@+id/textView18"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="40dp"
android:layout_marginLeft="40dp"
android:layout_marginTop="30dp"
android:layout_weight="2"
android:text="Total amount to pay: "
android:textSize="11pt" />
<TextView
android:id="@+id/totalAmountTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_marginEnd="40dp"
android:layout_marginRight="40dp"
android:layout_weight="1"
android:text=" 00 "
android:textSize="11pt" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout5"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout4">
<TextView
android:id="@+id/textView20"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="40dp"
android:layout_marginLeft="40dp"
android:layout_marginTop="30dp"
android:layout_weight="2"
android:text="Enter payment: "
android:textSize="11pt" />
<EditText
android:id="@+id/paymentTxt"
android:layout_width="67dp"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_marginEnd="40dp"
android:layout_marginRight="40dp"
android:layout_weight="1"
android:ems="10"
android:inputType="numberDecimal"
android:textSize="11pt" />
</LinearLayout>
<Button
android:id="@+id/payBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:onClick="displayReceipt"
android:paddingLeft="30dp"
android:paddingTop="10dp"
android:paddingRight="30dp"
android:paddingBottom="10dp"
android:text="pay"
android:textSize="11pt"
app:backgroundTint="@color/greenProj"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout5" />
<Button
android:id="@+id/button14"
android:layout_width="127dp"
android:layout_height="64dp"
android:layout_marginTop="20dp"
android:onClick="goToSummary"
android:text="@string/back"
android:textSize="9pt"
app:backgroundTint="@color/redProj"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/receiptTable" />
<Button
android:id="@+id/button13"
android:layout_width="182dp"
android:layout_height="68dp"
android:layout_marginTop="20dp"
android:onClick="goToConfirmation"
android:text="confirm booking"
android:textSize="7pt"
app:backgroundTint="@color/greenProj"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/receiptTable" />
<TableLayout
android:id="@+id/receiptTable"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:padding="10dp"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/payBtn">
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView26"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="5dp"
android:text="RECEIPT"
android:textSize="12pt"
android:textStyle="bold" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/payName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="Name"
android:textSize="10pt" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/payMuseum"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2"
android:padding="5dp"
android:text="Museum"
android:textSize="10pt" />
<TextView
android:id="@+id/payMuseumFee"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="5dp"
android:text="££"
android:textSize="10pt" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/payDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="Date"
android:textSize="10pt" />
<TextView
android:id="@+id/payTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="Time"
android:textSize="10pt" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/payRefreshment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2"
android:padding="5dp"
android:text="Refreshment"
android:textSize="10pt" />
<TextView
android:id="@+id/payRefrPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="5dp"
android:text="££"
android:textSize="10pt" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/paySouvenir"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2"
android:padding="5dp"
android:text="Souvenir"
android:textSize="10pt" />
<TextView
android:id="@+id/paySouvPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="5dp"
android:text="££"
android:textSize="10pt" />
</TableRow>
<TableRow
android:id="@+id/line"
android:layout_width="match_parent"
android:layout_height="match_parent">
<View
android:id="@+id/view"
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_marginTop="7dp"
android:layout_marginBottom="7dp"
android:layout_weight="1"
android:background="#CCCCCC" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView41"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2"
android:padding="5dp"
android:text="Total to pay"
android:textSize="10pt" />
<TextView
android:id="@+id/payTotal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="5dp"
android:text="££"
android:textSize="10pt" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView43"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2"
android:padding="5dp"
android:text="Payment"
android:textSize="10pt" />
<TextView
android:id="@+id/payPayment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="5dp"
android:text="££"
android:textSize="10pt" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView45"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2"
android:padding="5dp"
android:text="Change"
android:textSize="10pt" />
<TextView
android:id="@+id/payChange"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="5dp"
android:text="££"
android:textSize="10pt" />
</TableRow>
</TableLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</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"
android:background="@color/lightBrownProj"
tools:context=".RegistrationPage">
<Button
android:id="@+id/button"
android:layout_width="129dp"
android:layout_height="49dp"
android:layout_marginStart="140dp"
android:layout_marginLeft="140dp"
android:layout_marginTop="8dp"
android:onClick="clear"
android:text="@string/clear"
android:textSize="9pt"
app:backgroundTint="#D50000"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button2" />
<Button
android:id="@+id/button2"
android:layout_width="194dp"
android:layout_height="63dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="108dp"
android:layout_marginRight="108dp"
android:onClick="registerSubmitFn"
android:text="@string/submit"
android:textSize="9pt"
app:backgroundTint="#02AA48"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="80dp"
android:layout_marginLeft="80dp"
android:layout_marginTop="40dp"
android:text="@string/Registration"
android:textSize="20pt"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="337dp"
android:layout_height="310dp"
android:layout_marginTop="28dp"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView3">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="68dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="@string/Name"
android:textSize="12pt" />
<EditText
android:id="@+id/nameTxt"
android:layout_width="237dp"
android:layout_height="54dp"
android:layout_weight="1"
android:ems="10"
android:inputType="textPersonName"
android:textSize="12pt" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="68dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView5"
android:layout_width="141dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="@string/Surname"
android:textSize="12pt" />
<EditText
android:id="@+id/surnameTxt"
android:layout_width="237dp"
android:layout_height="54dp"
android:layout_weight="1"
android:ems="10"
android:inputType="textPersonName"
android:textSize="12pt" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="68dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="Username: "
android:textSize="12pt" />
<EditText
android:id="@+id/usernameTxt"
android:layout_width="203dp"
android:layout_height="54dp"
android:layout_weight="1"
android:ems="10"
android:inputType="textPersonName"
android:textSize="12pt" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="68dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView7"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="Password: "
android:textSize="12pt" />
<EditText
android:id="@+id/passwordTxt"
android:layout_width="wrap_content"
android:layout_height="54dp"
android:layout_weight="1"
android:ems="10"
android:inputType="textPassword" />
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/button4"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="140dp"
android:layout_height="59dp"
android:layout_marginTop="24dp"
android:layout_marginEnd="36dp"
android:layout_marginRight="36dp"
android:onClick="goToLogin"
android:text="@string/login"
android:textColor="@color/white"
android:textSize="8pt"
app:backgroundTint="@color/lightBrownProj"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button" />
</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"
android:background="@color/lightBrownProj"
tools:context=".ShopPage">
<TextView
android:id="@+id/bookingTitle3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center_horizontal"
android:text="Booking"
android:textSize="14pt"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/button12"
android:layout_width="127dp"
android:layout_height="64dp"
android:layout_below="@+id/linearLayout3"
android:layout_marginStart="40dp"
android:layout_marginLeft="40dp"
android:layout_marginTop="20dp"
android:onClick="goToCafe"
android:text="@string/back"
android:textSize="9pt"
app:backgroundTint="@color/redProj"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout3" />
<Button
android:id="@+id/button10"
android:layout_width="160dp"
android:layout_height="64dp"
android:layout_below="@+id/linearLayout3"
android:layout_marginTop="20dp"
android:layout_marginEnd="40dp"
android:layout_marginRight="40dp"
android:layout_toEndOf="@+id/button12"
android:layout_toRightOf="@+id/button12"
android:onClick="goToSummary"
android:text="review order ->"
android:textSize="8pt"
app:backgroundTint="@color/greenProj"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout3" />
<TextView
android:id="@+id/textView16"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:layout_marginRight="20dp"
android:text="Add a souvenir "
android:textSize="11pt"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressBar3" />
<ProgressBar
android:id="@+id/progressBar3"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="300dp"
android:layout_height="12dp"
android:layout_marginTop="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.495"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/bookingTitle3" />
<GridView
android:id="@+id/shopGV"
android:layout_width="0dp"
android:layout_height="380dp"
android:layout_marginStart="20dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:layout_marginRight="20dp"
android:horizontalSpacing="6dp"
android:numColumns="2"
android:verticalSpacing="6dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView16" />
<LinearLayout
android:id="@+id/linearLayout3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:layout_marginRight="20dp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/shopGV">
<TextView
android:id="@+id/textView17"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="Total souvenir £"
android:textSize="11pt"
android:textStyle="bold" />
<TextView
android:id="@+id/totSouTV"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:textSize="11pt" />
</LinearLayout>
</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"
android:background="@color/lightBrownProj"
tools:context=".PaymentPage">
<ProgressBar
android:id="@+id/progressBar4"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="300dp"
android:layout_height="12dp"
android:layout_marginTop="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.495"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/orderTitle" />
<Button
android:id="@+id/button14"
android:layout_width="127dp"
android:layout_height="64dp"
android:layout_below="@+id/museumDesc"
android:layout_marginStart="36dp"
android:layout_marginLeft="36dp"
android:layout_marginTop="20dp"
android:layout_toEndOf="@+id/button3"
android:layout_toRightOf="@+id/button3"
android:onClick="goToShopPage"
android:text="@string/back"
android:textSize="9pt"
app:backgroundTint="@color/redProj"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView23" />
<Button
android:id="@+id/button13"
android:layout_width="182dp"
android:layout_height="62dp"
android:layout_below="@+id/textView23"
android:layout_marginTop="20dp"
android:layout_marginEnd="36dp"
android:layout_marginRight="36dp"
android:layout_toEndOf="@+id/button14"
android:layout_toRightOf="@+id/button14"
android:onClick="goToPayment"
android:text="continue to payment ->"
android:textSize="7pt"
app:backgroundTint="@color/greenProj"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView23" />
<TextView
android:id="@+id/orderTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center_horizontal"
android:text="Summary"
android:textSize="14pt"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TableRow
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="40dp"
android:layout_marginLeft="40dp"
android:layout_marginEnd="40dp"
android:layout_marginRight="40dp"
app:layout_constraintBottom_toTopOf="@+id/textView23"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/summaryRecyclerView">
<View
android:id="@+id/view2"
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_marginTop="7dp"
android:layout_marginBottom="7dp"
android:layout_weight="1"
android:background="#CCCCCC" />
</TableRow>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/summaryRecyclerView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="40dp"
android:layout_marginLeft="40dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="40dp"
android:layout_marginRight="40dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressBar4" />
<TableRow
android:id="@+id/textView23"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="40dp"
android:layout_marginLeft="40dp"
android:layout_marginEnd="40dp"
android:layout_marginRight="40dp"
android:gravity="right"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/summaryRecyclerView">
<TextView
android:id="@+id/textView25"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Total "
android:textSize="11pt"
android:textStyle="bold" />
<TextView
android:id="@+id/totalSummary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="££"
android:textSize="11pt"
android:textStyle="bold" />
</TableRow>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.cardview.widget.CardView
android:id="@+id/cardViewCafe"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="2dp"
app:cardBackgroundColor="@color/lightBrownProj"
app:cardMaxElevation="10dp">
<LinearLayout
android:id="@+id/cafeBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp">
<TextView
android:id="@+id/refreshmentTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Item"
android:textSize="11pt"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="0dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="10dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal">
<Button
android:id="@+id/addCafe"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#2B2B2B"
android:text="add"
android:textSize="18sp"
app:backgroundTint="@color/greenProj" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center|end"
android:orientation="horizontal">
<ImageView
android:id="@+id/minus"
android:layout_width="41dp"
android:layout_height="39dp"
android:clickable="true"
android:focusable="true"
app:srcCompat="@drawable/minus" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:id="@+id/refQuantity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0"
android:textSize="11pt" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center|start"
android:orientation="horizontal">
<ImageView
android:id="@+id/plus"
android:layout_width="41dp"
android:layout_height="39dp"
android:clickable="true"
android:focusable="true"
app:srcCompat="@drawable/plus" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="right"
android:orientation="horizontal">
<ImageView
android:id="@+id/cafeImage"
android:layout_width="101dp"
android:layout_height="99dp"
android:layout_gravity="center"
app:srcCompat="@drawable/tea" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/itemText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="line 1"
android:textSize="14pt"
android:textStyle="bold" />
<!--separator line-->
<TextView
android:id="@+id/textViewDesc"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Brief description of the museum"
android:textSize="11pt" />
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_marginTop="7dp"
android:layout_marginBottom="7dp"
android:background="#CCCCCC" />
</LinearLayout>
\ 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">
<androidx.cardview.widget.CardView
android:id="@+id/shopCardView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dp"
app:cardBackgroundColor="@color/lightBrownProj"
app:cardElevation="10dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:padding="20dp">
<ImageView
android:id="@+id/itemImage"
android:layout_width="109dp"
android:layout_height="107dp"
app:srcCompat="@drawable/tshirt" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="5dp"
android:paddingTop="5dp"
android:paddingRight="5dp">
<TextView
android:id="@+id/itemNameTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="Shirt"
android:textSize="11pt" />
<TextView
android:id="@+id/itemPriceTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="££"
android:textSize="11pt" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="2dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center|end"
android:orientation="horizontal">
<ImageView
android:id="@+id/minusShop"
android:layout_width="41dp"
android:layout_height="39dp"
android:clickable="true"
android:focusable="true"
app:srcCompat="@drawable/minus" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:id="@+id/quantityTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0"
android:textSize="11pt" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center|start"
android:orientation="horizontal">
<ImageView
android:id="@+id/plusShop"
android:layout_width="41dp"
android:layout_height="39dp"
android:clickable="true"
android:focusable="true"
app:srcCompat="@drawable/plus" />
</LinearLayout>
</TableRow>
</LinearLayout>
</androidx.cardview.widget.CardView>
</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">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:padding="5dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/nameSummaryTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="Museum title"
android:textSize="11pt" />
<TextView
android:id="@+id/priceSummaryTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="££"
android:textSize="11pt" />
</LinearLayout>
</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">
<androidx.cardview.widget.CardView
android:id="@+id/cardViewID"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardBackgroundColor="@color/lightBrownProj"
app:cardCornerRadius="5dp"
app:cardMaxElevation="5dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/timeSlotTxt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="10dp"
android:text="time slot"
android:textColor="@color/brownPecanProj"
android:textSize="11pt" />
</androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ 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="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/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="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/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.MuseumApp" 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" tools:targetApi="l">?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>
<color name="greenProj">#02AA48</color>
<color name="redProj">#D50000</color>
<color name="brownPeanutProj">#795C34</color>
<color name="brownPecanProj">#4A2511</color>
<color name="lightBrownProj">#D8795C34</color>
</resources>
\ No newline at end of file
<resources>
<string name="app_name">MuseumApp</string>
<string name="back"><![CDATA[<- back]]></string>
<string name="login">login</string>
<string name="register">register</string>
<string name="Login">Login</string>
<string name="Username">Username</string>
<string name="Password">Password</string>
<string name="Help">Help</string>
<string name="clear">clear</string>
<string name="submit">submit</string>
<string name="Registration">Registration</string>
<string name="Name">Name:</string>
<string name="Surname">Surname:</string>
<string name="museum_title">museum title</string>
<string name="list_of_museums"><![CDATA[<- list of museums]]></string>
<string name="book"><![CDATA[book ->]]></string>
<string name="next"><![CDATA[next ->]]></string>
</resources>
\ No newline at end of file
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.MuseumApp" 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" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>
\ No newline at end of file
package com.example.museumapp;
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.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
\ 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
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
\ No newline at end of file
#Sat May 08 22:07:30 BST 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
#!/usr/bin/env sh
##############################################################################
##
## 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=""
# 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, switch paths to Windows format before running java
if $cygwin ; 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=$((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"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
@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 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=
@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 init
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 init
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
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
: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 %CMD_LINE_ARGS%
: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
include ':app'
rootProject.name = "MuseumApp"
\ No newline at end of file
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