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;
}
}
This diff is collapsed.
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
This diff is collapsed.
This diff is collapsed.
<?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
This diff is collapsed.
<?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
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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