Commit 2beb5920 authored by stefania.deca's avatar stefania.deca

+ Submitted to gitlab

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="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
/build
\ No newline at end of file
plugins {
id 'com.android.application'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.museum2"
minSdkVersion 27
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 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'com.android.support:design:30.0.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.museum2;
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.museum2", appContext.getPackageName());
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.museum2">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.Museum2">
<activity android:name=".Pay" />
<activity android:name=".Checkout" />
<activity android:name=".Coaster" />
<activity android:name=".Mug" />
<activity android:name=".Bottle" />
<activity android:name=".Keychain" />
<activity android:name=".Snowglobe" />
<activity android:name=".Hat" />
<activity android:name=".Shirt" />
<activity android:name=".Souvenir" />
<activity android:name=".Choose" />
<activity android:name=".Salad" />
<activity android:name=".Sweetroll" />
<activity android:name=".Sandwich" />
<activity android:name=".Flatbread" />
<activity android:name=".Coffee" />
<activity android:name=".Water" />
<activity android:name=".SummaryActivity" />
<activity android:name=".Caffee" />
<activity android:name=".Booking" />
<activity android:name=".Russia" />
<activity android:name=".American" />
<activity android:name=".History" />
<activity android:name=".Gallery" />
<activity android:name=".Tate" />
<activity android:name=".British" />
<activity android:name=".Metropolitan" />
<activity android:name=".Vatican" />
<activity android:name=".InfoActivity" />
<activity android:name=".China" />
<activity android:name=".Louvre" />
<activity android:name=".Museums" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".RegisterActivity" />
<activity android:name=".Main_page" />
<provider
android:name=".OrderProvider"
android:authorities="com.example.museum2"
android:exported="true" />
</application>
</manifest>
\ No newline at end of file
package com.example.museum2;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
public class American extends AppCompatActivity {
ImageView backbtn;
Button booking;
String BookingHolder;
TextView Booking_text;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_american);
backbtn = findViewById(R.id.back_pressed);
booking = findViewById(R.id.booking);
Booking_text = findViewById(R.id.american_text);
BookingHolder = Booking_text.getText().toString();
backbtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
American.super.onBackPressed();
}
});
booking.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// Going to Dashboard activity after login success message.
Intent intent = new Intent(American.this, Booking.class);
// Sending username to Main page using intent.
intent.putExtra("nume_muzeu", BookingHolder);
Singleton_variable.getInstance().setSingleton(BookingHolder);
Singleton_variable.getmInstance5().setSingleton_museum(BookingHolder);
startActivity(intent);
}
});
}
}
\ No newline at end of file
package com.example.museum2;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.CalendarView;
import android.widget.ImageView;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
public class Booking extends AppCompatActivity {
ImageView backbtn;
TextView nume_muzeu, show_date;
String BookingHolder,dateHolder;
CalendarView calendarView;
Button next;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_booking);
Intent intent = getIntent();
RadioGroup rg = (RadioGroup)findViewById(R.id.radio_group);
backbtn = findViewById(R.id.back_pressed);
nume_muzeu = findViewById(R.id.nume_muzeu);
show_date = findViewById(R.id.show_date);
calendarView = findViewById(R.id.calendarView);
next = findViewById(R.id.next);
calendarView.setOnDateChangeListener(
new CalendarView
.OnDateChangeListener() {
@Override
// In this Listener have one method
// and in this method we will
// get the value of DAYS, MONTH, YEARS
public void onSelectedDayChange(
@NonNull CalendarView view,
int year,
int month,
int dayOfMonth)
{
// Store the value of date with
// format in String type Variable
// Add 1 in month because month
// index is start with 0
String Date
= dayOfMonth + "-"
+ (month + 1) + "-" + year;
// set this date in TextView for Display
show_date.setText(Date);
dateHolder = show_date.getText().toString();
}
});
Bundle bundle = intent.getExtras();
BookingHolder = bundle.getString("nume_muzeu");
nume_muzeu.setText( BookingHolder);
Singleton_variable.getmInstance5().setSingleton_museum(BookingHolder);
next.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(Booking.this, Choose.class);
dateHolder = show_date.getText().toString();
Singleton_variable.getInstance2().setSingleton_date(dateHolder);
RadioButton radioButton;
int selectedId = rg.getCheckedRadioButtonId();
radioButton = (RadioButton) findViewById(selectedId);
String radiovalue = radioButton.getText().toString();
Singleton_variable.getInstance3().setSingleton_time(radiovalue);
startActivity(intent);
}
});
backbtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Booking.super.onBackPressed();
}
});
}
}
\ No newline at end of file
package com.example.museum2;
import android.app.LoaderManager;
import android.content.ContentValues;
import android.content.CursorLoader;
import android.content.Intent;
import android.content.Loader;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class Bottle extends AppCompatActivity implements LoaderManager.LoaderCallbacks<Cursor> {
ImageView imageView;
ImageButton plusquantity, minusquantity;
TextView quantitynumber, drinnkName, coffeePrice;
Button addtoCart;
int quantity;
public Uri mCurrentCartUri;
boolean hasAllRequiredValues = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_bottle);
imageView = findViewById(R.id.imageViewInfo);
plusquantity = findViewById(R.id.addquantity);
minusquantity = findViewById(R.id.subquantity);
quantitynumber = findViewById(R.id.quantity);
drinnkName = findViewById(R.id.drinkNameinInfo);
coffeePrice = findViewById(R.id.coffeePrice);
addtoCart = findViewById(R.id.addtocart);
// setting the name of drink
drinnkName.setText("Bottle");
addtoCart.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Bottle.this, SummaryActivity.class);
String price_test = coffeePrice.getText().toString();
intent.putExtra("price_test", price_test);
Singleton_variable.getInstance().setSingleton("no museum");
startActivity(intent);
SaveCart();
}
});
plusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// coffee price
int basePrice = 5;
quantity++;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
});
minusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int basePrice = 5;
// because we dont want the quantity go less than 0
if (quantity == 0) {
Toast.makeText(Bottle.this, "Cant decrease quantity < 0", Toast.LENGTH_SHORT).show();
} else {
quantity--;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
}
});
}
private boolean SaveCart() {
// getting the values from our views
String name = drinnkName.getText().toString();
String price = coffeePrice.getText().toString();
String quantity = quantitynumber.getText().toString();
ContentValues values = new ContentValues();
values.put(OrderContract.OrderEntry.COLUMN_NAME, name);
values.put(OrderContract.OrderEntry.COLUMN_PRICE, price);
values.put(OrderContract.OrderEntry.COLUMN_QUANTITY, quantity);
if (mCurrentCartUri == null) {
Uri newUri = getContentResolver().insert(OrderContract.OrderEntry.CONTENT_URI, values);
if (newUri==null) {
Toast.makeText(this, "Failed to add to Cart", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, "Success adding to Cart", Toast.LENGTH_SHORT).show();
}
}
hasAllRequiredValues = true;
return hasAllRequiredValues;
}
private void displayQuantity() {
quantitynumber.setText(String.valueOf(quantity));
}
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
String[] projection = {OrderContract.OrderEntry._ID,
OrderContract.OrderEntry.COLUMN_NAME,
OrderContract.OrderEntry.COLUMN_PRICE,
OrderContract.OrderEntry.COLUMN_QUANTITY,
};
return new CursorLoader(this, mCurrentCartUri,
projection,
null,
null,
null);
}
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
if (cursor == null || cursor.getCount() < 1) {
return;
}
if (cursor.moveToFirst()) {
int name = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_NAME);
int price = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_PRICE);
int quantity = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_QUANTITY);
String nameofdrink = cursor.getString(name);
String priceofdrink = cursor.getString(price);
String quantityofdrink = cursor.getString(quantity);
drinnkName.setText(nameofdrink);
coffeePrice.setText(priceofdrink);
quantitynumber.setText(quantityofdrink);
}
}
@Override
public void onLoaderReset(Loader<Cursor> loader) {
drinnkName.setText("");
coffeePrice.setText("");
quantitynumber.setText("");
}
}
\ No newline at end of file
package com.example.museum2;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
public class British extends AppCompatActivity {
ImageView backbtn;
Button booking;
String BookingHolder;
TextView Booking_text;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_british);
backbtn = findViewById(R.id.back_pressed);
booking = findViewById(R.id.booking);
Booking_text = findViewById(R.id.british_text);
BookingHolder = Booking_text.getText().toString();
backbtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
British.super.onBackPressed();
}
});
booking.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// Going to Dashboard activity after login success message.
Intent intent = new Intent(British.this, Booking.class);
// Sending username to Main page using intent.
intent.putExtra("nume_muzeu", BookingHolder);
Singleton_variable.getInstance().setSingleton(BookingHolder);
Singleton_variable.getmInstance5().setSingleton_museum(BookingHolder);
startActivity(intent);
}
});
}
}
\ No newline at end of file
package com.example.museum2;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
import java.util.List;
public class Caffee extends AppCompatActivity {
List<Model> modelList;
RecyclerView recyclerView;
OrderAdapter mAdapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_caffee);
// creating an arraylist
modelList = new ArrayList<>();
modelList.add(new Model("Green Tea", getString(R.string.greentea), R.drawable.greentea ));
modelList.add(new Model("Water", getString(R.string.water), R.drawable.water));
modelList.add(new Model("Coffee", getString(R.string.coffee), R.drawable.coffee));
modelList.add(new Model("Flatbread", getString(R.string.flatbread), R.drawable.flatbread));
modelList.add(new Model("Sandwich", getString(R.string.sandwich), R.drawable.sandwich));
modelList.add(new Model("Sweet roll", getString(R.string.sweetroll), R.drawable.sweetroll));
modelList.add(new Model("Salad", getString(R.string.salad), R.drawable.salad));
// recyclerview
recyclerView = findViewById(R.id.recyclerView);
recyclerView.setLayoutManager(new LinearLayoutManager(null));
// adapter
mAdapter = new OrderAdapter(this, modelList);
recyclerView.setAdapter(mAdapter);
}
}
\ No newline at end of file
package com.example.museum2;
import android.content.Context;
import android.database.Cursor;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CursorAdapter;
import android.widget.TextView;
public class CartAdapter extends CursorAdapter {
public CartAdapter(Context context, Cursor cursor) {
super(context, cursor, 0);
}
@Override
public View newView(Context context, Cursor cursor, ViewGroup parent) {
return LayoutInflater.from(context).inflate(R.layout.cartlist, parent, false);
}
@Override
public void bindView(View view, Context context, Cursor cursor) {
// getting theviews
TextView drinkName,price, quantity;
drinkName = view.findViewById(R.id.drinkNameinOrderSummary);
price = view.findViewById(R.id.priceinOrderSummary);
quantity = view.findViewById(R.id.quantityinOrderSummary);
// getting the values by first getting the position of their columns
int name = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_NAME);
int priceofdrink = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_PRICE);
int quantityofdrink = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_QUANTITY);
String nameofdrink = cursor.getString(name);
String pricesofdrink = cursor.getString(priceofdrink);
String quantitysofdrink = cursor.getString(quantityofdrink);
drinkName.setText(nameofdrink);
price.setText(pricesofdrink);
quantity.setText(quantitysofdrink);
}
}
\ No newline at end of file
package com.example.museum2;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
public class Checkout extends AppCompatActivity {
TextView shop_checkout,museum_checkout,price_museum;
Button pay;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_checkout);
shop_checkout = findViewById(R.id.shop_checkout);
museum_checkout = findViewById(R.id.museum_checkout);
price_museum = findViewById(R.id.price_museum);
pay = findViewById(R.id.pay_);
int sum = Singleton.getInstance().sum();
shop_checkout.setText("SHOP CHECKOUT: £" + sum);
String muzeu2 = Singleton_variable.getInstance().getSingleton();
String muzeu = Singleton_variable.getmInstance5().getSingleton_museum();
if (muzeu.equals("Louvre Museum") ||muzeu.equals("National Museum of China") ||muzeu.equals("Vatican Museum") ||muzeu.equals("Metropolitan Museum") ||muzeu.equals("British Museum")) {
price_museum.setText(muzeu + " (Price ticket) " + "£10");
sum = sum + 10;
}
else if (muzeu.equals("Tate Modern") ||muzeu.equals("National Gallery") ||muzeu.equals("Natural History Museum") ||muzeu.equals("American Museum of Natural History") ||muzeu.equals("State Hermitage Museum")){
price_museum.setText(muzeu + " (Price ticket) " + "£5");
sum = sum + 5;
}
else if (muzeu2.equals("no museum")) {
price_museum.setText("Museum: No museum selected");
}
museum_checkout.setText("TOTAL: £" + sum);
Singleton_variable.getmInstance6().setSingleton_total_sum(sum);
pay.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// Going to Dashboard activity after login success message.
Intent intent = new Intent(Checkout.this, Pay.class);
startActivity(intent);
}
});
}
}
\ No newline at end of file
package com.example.museum2;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
public class China extends AppCompatActivity {
ImageView backbtn;
Button booking;
String BookingHolder;
TextView Booking_text;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_china);
backbtn = findViewById(R.id.back_pressed);
booking = findViewById(R.id.booking);
Booking_text = findViewById(R.id.china_text);
BookingHolder = Booking_text.getText().toString();
backbtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
China.super.onBackPressed();
}
});
booking.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// Going to Dashboard activity after login success message.
Intent intent = new Intent(China.this, Booking.class);
// Sending username to Main page using intent.
intent.putExtra("nume_muzeu", BookingHolder);
Singleton_variable.getInstance().setSingleton(BookingHolder);
Singleton_variable.getmInstance5().setSingleton_museum(BookingHolder);
startActivity(intent);
}
});
}
}
\ No newline at end of file
package com.example.museum2;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import androidx.appcompat.app.AppCompatActivity;
public class Choose extends AppCompatActivity {
ImageView backbtn;
Button caffee_shop,souvenirshop,pay;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_choose);
backbtn = findViewById(R.id.back_pressed);
caffee_shop= findViewById(R.id.caffee_shop);
souvenirshop= findViewById(R.id.souvenirshop);
pay= findViewById(R.id.pay);
caffee_shop.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// Going to Dashboard activity after login success message.
Intent intent = new Intent(Choose.this, Caffee.class);
startActivity(intent);
}
});
souvenirshop.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// Going to Dashboard activity after login success message.
Intent intent = new Intent(Choose.this, Souvenir.class);
startActivity(intent);
}
});
backbtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Choose.super.onBackPressed();
}
});
pay.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// Going to Dashboard activity after login success message.
Intent intent = new Intent(Choose.this, Checkout.class);
startActivity(intent);
}
});
}
}
\ No newline at end of file
package com.example.museum2;
import android.app.LoaderManager;
import android.content.ContentValues;
import android.content.CursorLoader;
import android.content.Intent;
import android.content.Loader;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class Coaster extends AppCompatActivity implements LoaderManager.LoaderCallbacks<Cursor> {
ImageView imageView;
ImageButton plusquantity, minusquantity;
TextView quantitynumber, drinnkName, coffeePrice;
Button addtoCart;
int quantity;
public Uri mCurrentCartUri;
boolean hasAllRequiredValues = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_coaster);
imageView = findViewById(R.id.imageViewInfo);
plusquantity = findViewById(R.id.addquantity);
minusquantity = findViewById(R.id.subquantity);
quantitynumber = findViewById(R.id.quantity);
drinnkName = findViewById(R.id.drinkNameinInfo);
coffeePrice = findViewById(R.id.coffeePrice);
addtoCart = findViewById(R.id.addtocart);
// setting the name of drink
drinnkName.setText("Coaster");
addtoCart.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Coaster.this, SummaryActivity.class);
String price_test = coffeePrice.getText().toString();
intent.putExtra("price_test", price_test);
Singleton_variable.getInstance().setSingleton("no museum");
startActivity(intent);
// once this button is clicked we want to save our values in the database and send those values
// right away to summary activity where we display the order info
SaveCart();
}
});
plusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// coffee price
int basePrice = 2;
quantity++;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
});
minusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int basePrice = 2;
// because we dont want the quantity go less than 0
if (quantity == 0) {
Toast.makeText(Coaster.this, "Cant decrease quantity < 0", Toast.LENGTH_SHORT).show();
} else {
quantity--;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
}
});
}
private boolean SaveCart() {
// getting the values from our views
String name = drinnkName.getText().toString();
String price = coffeePrice.getText().toString();
String quantity = quantitynumber.getText().toString();
ContentValues values = new ContentValues();
values.put(OrderContract.OrderEntry.COLUMN_NAME, name);
values.put(OrderContract.OrderEntry.COLUMN_PRICE, price);
values.put(OrderContract.OrderEntry.COLUMN_QUANTITY, quantity);
if (mCurrentCartUri == null) {
Uri newUri = getContentResolver().insert(OrderContract.OrderEntry.CONTENT_URI, values);
if (newUri==null) {
Toast.makeText(this, "Failed to add to Cart", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, "Success adding to Cart", Toast.LENGTH_SHORT).show();
}
}
hasAllRequiredValues = true;
return hasAllRequiredValues;
}
private void displayQuantity() {
quantitynumber.setText(String.valueOf(quantity));
}
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
String[] projection = {OrderContract.OrderEntry._ID,
OrderContract.OrderEntry.COLUMN_NAME,
OrderContract.OrderEntry.COLUMN_PRICE,
OrderContract.OrderEntry.COLUMN_QUANTITY,
};
return new CursorLoader(this, mCurrentCartUri,
projection,
null,
null,
null);
}
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
if (cursor == null || cursor.getCount() < 1) {
return;
}
if (cursor.moveToFirst()) {
int name = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_NAME);
int price = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_PRICE);
int quantity = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_QUANTITY);
String nameofdrink = cursor.getString(name);
String priceofdrink = cursor.getString(price);
String quantityofdrink = cursor.getString(quantity);
drinnkName.setText(nameofdrink);
coffeePrice.setText(priceofdrink);
quantitynumber.setText(quantityofdrink);
}
}
@Override
public void onLoaderReset(Loader<Cursor> loader) {
drinnkName.setText("");
coffeePrice.setText("");
quantitynumber.setText("");
}
}
\ No newline at end of file
package com.example.museum2;
import android.app.LoaderManager;
import android.content.ContentValues;
import android.content.CursorLoader;
import android.content.Intent;
import android.content.Loader;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class Coffee extends AppCompatActivity implements LoaderManager.LoaderCallbacks<Cursor> {
// first of all we will get the views that are present in the layout of info
ImageView imageView;
ImageButton plusquantity, minusquantity;
TextView quantitynumber, drinnkName, coffeePrice;
Button addtoCart;
int quantity;
public Uri mCurrentCartUri;
boolean hasAllRequiredValues = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.coffee);
imageView = findViewById(R.id.imageViewInfo);
plusquantity = findViewById(R.id.addquantity);
minusquantity = findViewById(R.id.subquantity);
quantitynumber = findViewById(R.id.quantity);
drinnkName = findViewById(R.id.drinkNameinInfo);
coffeePrice = findViewById(R.id.coffeePrice);
addtoCart = findViewById(R.id.addtocart);
// setting the name of drink
drinnkName.setText("Coffee");
addtoCart.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Coffee.this, SummaryActivity.class);
String price_test = coffeePrice.getText().toString();
intent.putExtra("price_test", price_test);
Singleton_variable.getInstance().setSingleton("no museum");
startActivity(intent);
// once this button is clicked we want to save our values in the database and send those values
// right away to summary activity where we display the order info
SaveCart();
}
});
plusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// coffee price
int basePrice = 2;
quantity++;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
});
minusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int basePrice = 2;
// because we dont want the quantity go less than 0
if (quantity == 0) {
Toast.makeText(Coffee.this, "Cant decrease quantity < 0", Toast.LENGTH_SHORT).show();
} else {
quantity--;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
}
});
}
private boolean SaveCart() {
// getting the values from our views
String name = drinnkName.getText().toString();
String price = coffeePrice.getText().toString();
String quantity = quantitynumber.getText().toString();
ContentValues values = new ContentValues();
values.put(OrderContract.OrderEntry.COLUMN_NAME, name);
values.put(OrderContract.OrderEntry.COLUMN_PRICE, price);
values.put(OrderContract.OrderEntry.COLUMN_QUANTITY, quantity);
if (mCurrentCartUri == null) {
Uri newUri = getContentResolver().insert(OrderContract.OrderEntry.CONTENT_URI, values);
if (newUri==null) {
Toast.makeText(this, "Failed to add to Cart", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, "Success adding to Cart", Toast.LENGTH_SHORT).show();
}
}
hasAllRequiredValues = true;
return hasAllRequiredValues;
}
private void displayQuantity() {
quantitynumber.setText(String.valueOf(quantity));
}
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
String[] projection = {OrderContract.OrderEntry._ID,
OrderContract.OrderEntry.COLUMN_NAME,
OrderContract.OrderEntry.COLUMN_PRICE,
OrderContract.OrderEntry.COLUMN_QUANTITY,
};
return new CursorLoader(this, mCurrentCartUri,
projection,
null,
null,
null);
}
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
if (cursor == null || cursor.getCount() < 1) {
return;
}
if (cursor.moveToFirst()) {
int name = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_NAME);
int price = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_PRICE);
int quantity = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_QUANTITY);
String nameofdrink = cursor.getString(name);
String priceofdrink = cursor.getString(price);
String quantityofdrink = cursor.getString(quantity);
drinnkName.setText(nameofdrink);
coffeePrice.setText(priceofdrink);
quantitynumber.setText(quantityofdrink);
}
}
@Override
public void onLoaderReset(Loader<Cursor> loader) {
drinnkName.setText("");
coffeePrice.setText("");
quantitynumber.setText("");
}
}
\ No newline at end of file
package com.example.museum2;
import android.app.LoaderManager;
import android.content.ContentValues;
import android.content.CursorLoader;
import android.content.Intent;
import android.content.Loader;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class Flatbread extends AppCompatActivity implements LoaderManager.LoaderCallbacks<Cursor> {
// first of all we will get the views that are present in the layout of info
ImageView imageView;
ImageButton plusquantity, minusquantity;
TextView quantitynumber, drinnkName, coffeePrice;
Button addtoCart;
int quantity;
public Uri mCurrentCartUri;
boolean hasAllRequiredValues = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_flatbread);
imageView = findViewById(R.id.imageViewInfo);
plusquantity = findViewById(R.id.addquantity);
minusquantity = findViewById(R.id.subquantity);
quantitynumber = findViewById(R.id.quantity);
drinnkName = findViewById(R.id.drinkNameinInfo);
coffeePrice = findViewById(R.id.coffeePrice);
addtoCart = findViewById(R.id.addtocart);
// setting the name of drink
drinnkName.setText("Flat bread");
addtoCart.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Flatbread.this, SummaryActivity.class);
String price_test = coffeePrice.getText().toString();
intent.putExtra("price_test", price_test);
Singleton_variable.getInstance().setSingleton("no museum");
startActivity(intent);
// once this button is clicked we want to save our values in the database and send those values
// right away to summary activity where we display the order info
SaveCart();
}
});
plusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// coffee price
int basePrice = 2;
quantity++;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
});
minusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int basePrice = 2;
// because we dont want the quantity go less than 0
if (quantity == 0) {
Toast.makeText(Flatbread.this, "Cant decrease quantity < 0", Toast.LENGTH_SHORT).show();
} else {
quantity--;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
}
});
}
private boolean SaveCart() {
// getting the values from our views
String name = drinnkName.getText().toString();
String price = coffeePrice.getText().toString();
String quantity = quantitynumber.getText().toString();
ContentValues values = new ContentValues();
values.put(OrderContract.OrderEntry.COLUMN_NAME, name);
values.put(OrderContract.OrderEntry.COLUMN_PRICE, price);
values.put(OrderContract.OrderEntry.COLUMN_QUANTITY, quantity);
if (mCurrentCartUri == null) {
Uri newUri = getContentResolver().insert(OrderContract.OrderEntry.CONTENT_URI, values);
if (newUri==null) {
Toast.makeText(this, "Failed to add to Cart", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, "Success adding to Cart", Toast.LENGTH_SHORT).show();
}
}
hasAllRequiredValues = true;
return hasAllRequiredValues;
}
private void displayQuantity() {
quantitynumber.setText(String.valueOf(quantity));
}
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
String[] projection = {OrderContract.OrderEntry._ID,
OrderContract.OrderEntry.COLUMN_NAME,
OrderContract.OrderEntry.COLUMN_PRICE,
OrderContract.OrderEntry.COLUMN_QUANTITY,
};
return new CursorLoader(this, mCurrentCartUri,
projection,
null,
null,
null);
}
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
if (cursor == null || cursor.getCount() < 1) {
return;
}
if (cursor.moveToFirst()) {
int name = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_NAME);
int price = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_PRICE);
int quantity = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_QUANTITY);
String nameofdrink = cursor.getString(name);
String priceofdrink = cursor.getString(price);
String quantityofdrink = cursor.getString(quantity);
drinnkName.setText(nameofdrink);
coffeePrice.setText(priceofdrink);
quantitynumber.setText(quantityofdrink);
}
}
@Override
public void onLoaderReset(Loader<Cursor> loader) {
drinnkName.setText("");
coffeePrice.setText("");
quantitynumber.setText("");
}
}
\ No newline at end of file
package com.example.museum2;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
public class Gallery extends AppCompatActivity {
ImageView backbtn;
Button booking;
String BookingHolder;
TextView Booking_text;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_gallery);
backbtn = findViewById(R.id.back_pressed);
booking = findViewById(R.id.booking);
Booking_text = findViewById(R.id.gallery);
BookingHolder = Booking_text.getText().toString();
backbtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Gallery.super.onBackPressed();
}
});
booking.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// Going to Dashboard activity after login success message.
Intent intent = new Intent(Gallery.this, Booking.class);
// Sending username to Main page using intent.
intent.putExtra("nume_muzeu", BookingHolder);
Singleton_variable.getInstance().setSingleton(BookingHolder);
Singleton_variable.getmInstance5().setSingleton_museum(BookingHolder);
startActivity(intent);
}
});
}
}
\ No newline at end of file
package com.example.museum2;
import android.app.LoaderManager;
import android.content.ContentValues;
import android.content.CursorLoader;
import android.content.Intent;
import android.content.Loader;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class Hat extends AppCompatActivity implements LoaderManager.LoaderCallbacks<Cursor> {
ImageView imageView;
ImageButton plusquantity, minusquantity;
TextView quantitynumber, drinnkName, coffeePrice;
Button addtoCart;
int quantity;
public Uri mCurrentCartUri;
boolean hasAllRequiredValues = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_hat);
imageView = findViewById(R.id.imageViewInfo);
plusquantity = findViewById(R.id.addquantity);
minusquantity = findViewById(R.id.subquantity);
quantitynumber = findViewById(R.id.quantity);
drinnkName = findViewById(R.id.drinkNameinInfo);
coffeePrice = findViewById(R.id.coffeePrice);
addtoCart = findViewById(R.id.addtocart);
// setting the name of drink
drinnkName.setText("Hat");
addtoCart.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Hat.this, SummaryActivity.class);
String price_test = coffeePrice.getText().toString();
intent.putExtra("price_test", price_test);
Singleton_variable.getInstance().setSingleton("no museum");
startActivity(intent);
// once this button is clicked we want to save our values in the database and send those values
// right away to summary activity where we display the order info
SaveCart();
}
});
plusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// coffee price
int basePrice = 5;
quantity++;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
});
minusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int basePrice = 5;
// because we dont want the quantity go less than 0
if (quantity == 0) {
Toast.makeText(Hat.this, "Cant decrease quantity < 0", Toast.LENGTH_SHORT).show();
} else {
quantity--;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
}
});
}
private boolean SaveCart() {
// getting the values from our views
String name = drinnkName.getText().toString();
String price = coffeePrice.getText().toString();
String quantity = quantitynumber.getText().toString();
ContentValues values = new ContentValues();
values.put(OrderContract.OrderEntry.COLUMN_NAME, name);
values.put(OrderContract.OrderEntry.COLUMN_PRICE, price);
values.put(OrderContract.OrderEntry.COLUMN_QUANTITY, quantity);
if (mCurrentCartUri == null) {
Uri newUri = getContentResolver().insert(OrderContract.OrderEntry.CONTENT_URI, values);
if (newUri==null) {
Toast.makeText(this, "Failed to add to Cart", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, "Success adding to Cart", Toast.LENGTH_SHORT).show();
}
}
hasAllRequiredValues = true;
return hasAllRequiredValues;
}
private void displayQuantity() {
quantitynumber.setText(String.valueOf(quantity));
}
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
String[] projection = {OrderContract.OrderEntry._ID,
OrderContract.OrderEntry.COLUMN_NAME,
OrderContract.OrderEntry.COLUMN_PRICE,
OrderContract.OrderEntry.COLUMN_QUANTITY,
};
return new CursorLoader(this, mCurrentCartUri,
projection,
null,
null,
null);
}
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
if (cursor == null || cursor.getCount() < 1) {
return;
}
if (cursor.moveToFirst()) {
int name = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_NAME);
int price = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_PRICE);
int quantity = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_QUANTITY);
String nameofdrink = cursor.getString(name);
String priceofdrink = cursor.getString(price);
String quantityofdrink = cursor.getString(quantity);
drinnkName.setText(nameofdrink);
coffeePrice.setText(priceofdrink);
quantitynumber.setText(quantityofdrink);
}
}
@Override
public void onLoaderReset(Loader<Cursor> loader) {
drinnkName.setText("");
coffeePrice.setText("");
quantitynumber.setText("");
}
}
\ No newline at end of file
package com.example.museum2;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
public class History extends AppCompatActivity {
ImageView backbtn;
Button booking;
String BookingHolder;
TextView Booking_text;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_history);
backbtn = findViewById(R.id.back_pressed);
booking = findViewById(R.id.booking);
Booking_text = findViewById(R.id.history_text);
BookingHolder = Booking_text.getText().toString();
backbtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
History.super.onBackPressed();
}
});
booking.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// Going to Dashboard activity after login success message.
Intent intent = new Intent(History.this, Booking.class);
// Sending username to Main page using intent.
intent.putExtra("nume_muzeu", BookingHolder);
Singleton_variable.getInstance().setSingleton(BookingHolder);
Singleton_variable.getmInstance5().setSingleton_museum(BookingHolder);
startActivity(intent);
}
});
}
}
\ No newline at end of file
package com.example.museum2;
import android.app.LoaderManager;
import android.content.ContentValues;
import android.content.CursorLoader;
import android.content.Intent;
import android.content.Loader;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class InfoActivity extends AppCompatActivity implements LoaderManager.LoaderCallbacks<Cursor> {
ImageView imageView;
ImageButton plusquantity, minusquantity;
TextView quantitynumber, drinnkName, coffeePrice;
Button addtoCart;
int quantity;
public Uri mCurrentCartUri;
boolean hasAllRequiredValues = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_info);
imageView = findViewById(R.id.imageViewInfo);
plusquantity = findViewById(R.id.addquantity);
minusquantity = findViewById(R.id.subquantity);
quantitynumber = findViewById(R.id.quantity);
drinnkName = findViewById(R.id.drinkNameinInfo);
coffeePrice = findViewById(R.id.coffeePrice);
addtoCart = findViewById(R.id.addtocart);
// setting the name of drink
drinnkName.setText("Green Tea");
addtoCart.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(InfoActivity.this, SummaryActivity.class);
String price_test = coffeePrice.getText().toString();
intent.putExtra("price_test", price_test);
Singleton_variable.getInstance().setSingleton("no museum");
startActivity(intent);
// once this button is clicked we want to save our values in the database and send those values
// right away to summary activity where we display the order info
SaveCart();
}
});
plusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// coffee price
int basePrice = 1;
quantity++;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
});
minusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int basePrice = 1;
// because we dont want the quantity go less than 0
if (quantity == 0) {
Toast.makeText(InfoActivity.this, "Cant decrease quantity < 0", Toast.LENGTH_SHORT).show();
} else {
quantity--;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
}
});
}
private boolean SaveCart() {
// getting the values from our views
String name = drinnkName.getText().toString();
String price = coffeePrice.getText().toString();
String quantity = quantitynumber.getText().toString();
ContentValues values = new ContentValues();
values.put(OrderContract.OrderEntry.COLUMN_NAME, name);
values.put(OrderContract.OrderEntry.COLUMN_PRICE, price);
values.put(OrderContract.OrderEntry.COLUMN_QUANTITY, quantity);
if (mCurrentCartUri == null) {
Uri newUri = getContentResolver().insert(OrderContract.OrderEntry.CONTENT_URI, values);
if (newUri==null) {
Toast.makeText(this, "Failed to add to Cart", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, "Success adding to Cart", Toast.LENGTH_SHORT).show();
}
}
hasAllRequiredValues = true;
return hasAllRequiredValues;
}
private void displayQuantity() {
quantitynumber.setText(String.valueOf(quantity));
}
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
String[] projection = {OrderContract.OrderEntry._ID,
OrderContract.OrderEntry.COLUMN_NAME,
OrderContract.OrderEntry.COLUMN_PRICE,
OrderContract.OrderEntry.COLUMN_QUANTITY,
};
return new CursorLoader(this, mCurrentCartUri,
projection,
null,
null,
null);
}
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
if (cursor == null || cursor.getCount() < 1) {
return;
}
if (cursor.moveToFirst()) {
int name = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_NAME);
int price = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_PRICE);
int quantity = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_QUANTITY);
String nameofdrink = cursor.getString(name);
String priceofdrink = cursor.getString(price);
String quantityofdrink = cursor.getString(quantity);
drinnkName.setText(nameofdrink);
coffeePrice.setText(priceofdrink);
quantitynumber.setText(quantityofdrink);
}
}
@Override
public void onLoaderReset(Loader<Cursor> loader) {
drinnkName.setText("");
coffeePrice.setText("");
quantitynumber.setText("");
}
}
\ No newline at end of file
package com.example.museum2;
import android.app.LoaderManager;
import android.content.ContentValues;
import android.content.CursorLoader;
import android.content.Intent;
import android.content.Loader;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class Keychain extends AppCompatActivity implements LoaderManager.LoaderCallbacks<Cursor> {
ImageView imageView;
ImageButton plusquantity, minusquantity;
TextView quantitynumber, drinnkName, coffeePrice;
Button addtoCart;
int quantity;
public Uri mCurrentCartUri;
boolean hasAllRequiredValues = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_keychain);
imageView = findViewById(R.id.imageViewInfo);
plusquantity = findViewById(R.id.addquantity);
minusquantity = findViewById(R.id.subquantity);
quantitynumber = findViewById(R.id.quantity);
drinnkName = findViewById(R.id.drinkNameinInfo);
coffeePrice = findViewById(R.id.coffeePrice);
addtoCart = findViewById(R.id.addtocart);
// setting the name of drink
drinnkName.setText("Key chain");
addtoCart.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Keychain.this, SummaryActivity.class);
String price_test = coffeePrice.getText().toString();
intent.putExtra("price_test", price_test);
Singleton_variable.getInstance().setSingleton("no museum");
startActivity(intent);
// once this button is clicked we want to save our values in the database and send those values
// right away to summary activity where we display the order info
SaveCart();
}
});
plusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// coffee price
int basePrice = 5;
quantity++;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
});
minusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int basePrice = 5;
// because we dont want the quantity go less than 0
if (quantity == 0) {
Toast.makeText(Keychain.this, "Cant decrease quantity < 0", Toast.LENGTH_SHORT).show();
} else {
quantity--;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
}
});
}
private boolean SaveCart() {
// getting the values from our views
String name = drinnkName.getText().toString();
String price = coffeePrice.getText().toString();
String quantity = quantitynumber.getText().toString();
ContentValues values = new ContentValues();
values.put(OrderContract.OrderEntry.COLUMN_NAME, name);
values.put(OrderContract.OrderEntry.COLUMN_PRICE, price);
values.put(OrderContract.OrderEntry.COLUMN_QUANTITY, quantity);
if (mCurrentCartUri == null) {
Uri newUri = getContentResolver().insert(OrderContract.OrderEntry.CONTENT_URI, values);
if (newUri==null) {
Toast.makeText(this, "Failed to add to Cart", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, "Success adding to Cart", Toast.LENGTH_SHORT).show();
}
}
hasAllRequiredValues = true;
return hasAllRequiredValues;
}
private void displayQuantity() {
quantitynumber.setText(String.valueOf(quantity));
}
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
String[] projection = {OrderContract.OrderEntry._ID,
OrderContract.OrderEntry.COLUMN_NAME,
OrderContract.OrderEntry.COLUMN_PRICE,
OrderContract.OrderEntry.COLUMN_QUANTITY,
};
return new CursorLoader(this, mCurrentCartUri,
projection,
null,
null,
null);
}
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
if (cursor == null || cursor.getCount() < 1) {
return;
}
if (cursor.moveToFirst()) {
int name = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_NAME);
int price = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_PRICE);
int quantity = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_QUANTITY);
String nameofdrink = cursor.getString(name);
String priceofdrink = cursor.getString(price);
String quantityofdrink = cursor.getString(quantity);
drinnkName.setText(nameofdrink);
coffeePrice.setText(priceofdrink);
quantitynumber.setText(quantityofdrink);
}
}
@Override
public void onLoaderReset(Loader<Cursor> loader) {
drinnkName.setText("");
coffeePrice.setText("");
quantitynumber.setText("");
}
}
\ No newline at end of file
package com.example.museum2;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
public class Louvre extends AppCompatActivity {
ImageView backbtn;
Button booking;
String BookingHolder;
TextView Booking_text;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_louvre);
backbtn = findViewById(R.id.back_pressed);
booking = findViewById(R.id.booking);
Booking_text = findViewById(R.id.louvre_text);
BookingHolder = Booking_text.getText().toString();
backbtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Louvre.super.onBackPressed();
}
});
booking.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// Going to Dashboard activity after login success message.
Intent intent = new Intent(Louvre.this, Booking.class);
// Sending username to Main page using intent.
intent.putExtra("nume_muzeu", BookingHolder);
Singleton_variable.getInstance().setSingleton(BookingHolder);
Singleton_variable.getmInstance5().setSingleton_museum(BookingHolder);
startActivity(intent);
}
});
}
}
\ No newline at end of file
package com.example.museum2;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class MainActivity extends AppCompatActivity {
Button LogInButton, RegisterButton ;
EditText Username, Password ;
String UsernameHolder, PasswordHolder;
Boolean EditTextEmptyHolder;
SQLiteDatabase sqLiteDatabaseObj;
SQLiteHelper sqLiteHelper;
Cursor cursor;
String TempPassword = "NOT_FOUND" ;
public static final String UserName = "";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
LogInButton = (Button)findViewById(R.id.login_btn);
RegisterButton = (Button)findViewById(R.id.register_btn);
Username = (EditText)findViewById(R.id.editusername);
Password = (EditText)findViewById(R.id.editPassword);
sqLiteHelper = new SQLiteHelper(this);
//Adding click listener to log in button.
LogInButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// Calling EditText is empty or no method.
CheckEditTextStatus();
// Calling login method.
LoginFunction();
}
});
// Adding click listener to register button.
RegisterButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// Opening new user registration activity using intent on button click.
Intent intent = new Intent(MainActivity.this, RegisterActivity.class);
startActivity(intent);
}
});
}
// Login function starts from here.
public void LoginFunction(){
if(EditTextEmptyHolder) {
// Opening SQLite database write permission.
sqLiteDatabaseObj = sqLiteHelper.getWritableDatabase();
// Adding search username query to cursor.
cursor = sqLiteDatabaseObj.query(SQLiteHelper.TABLE_NAME, null, " " + SQLiteHelper.Table_Column_2_Username + "=?", new String[]{UsernameHolder}, null, null, null);
while (cursor.moveToNext()) {
if (cursor.isFirst()) {
cursor.moveToFirst();
// Storing Password associated with entered username.
TempPassword = cursor.getString(cursor.getColumnIndex(SQLiteHelper.Table_Column_3_Password));
// Closing cursor.
cursor.close();
}
}
// Calling method to check final result ..
CheckFinalResult();
}
else {
//If any of login EditText empty then this block will be executed.
Toast.makeText(MainActivity.this,"Please Enter Username or Password.",Toast.LENGTH_LONG).show();
}
}
// Checking EditText is empty or not.
public void CheckEditTextStatus(){
// Getting value from All EditText and storing into String Variables.
UsernameHolder = Username.getText().toString();
PasswordHolder = Password.getText().toString();
// Checking EditText is empty or no using TextUtils.
if( TextUtils.isEmpty(UsernameHolder) || TextUtils.isEmpty(PasswordHolder)){
EditTextEmptyHolder = false ;
}
else {
EditTextEmptyHolder = true ;
}
}
// Checking entered password from SQLite database username associated password.
public void CheckFinalResult(){
if(TempPassword.equalsIgnoreCase(PasswordHolder))
{
Toast.makeText(MainActivity.this,"Login Successful",Toast.LENGTH_LONG).show();
// Going to Dashboard activity after login success message.
Intent intent = new Intent(MainActivity.this, Main_page.class);
// Sending username to Main page using intent.
intent.putExtra("username", UsernameHolder);
Singleton_variable.getmInstance4().setSingleton_name(UsernameHolder);
startActivity(intent);
}
else {
Toast.makeText(MainActivity.this,"UserName or Password is Wrong, Please Try Again.",Toast.LENGTH_LONG).show();
}
TempPassword = "NOT_FOUND" ;
}
}
\ No newline at end of file
package com.example.museum2;
import android.content.Intent;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.view.GravityCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import com.google.android.material.navigation.NavigationView;
public class Main_page extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener {
DrawerLayout drawerLayout;
NavigationView navigationView;
Toolbar toolbar;
RelativeLayout museum_clickable,caffee_clickable,souvenir_clickable,payment_clickable;
String UsernameHolder;
TextView Username;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_page);
drawerLayout = findViewById(R.id.drawer_layout);
navigationView = findViewById(R.id.nav_view);
toolbar = findViewById(R.id.toolbar);
museum_clickable = findViewById(R.id.museum_clickable);
caffee_clickable = findViewById(R.id.caffe_clickable);
souvenir_clickable = findViewById(R.id.souvenir_shop_clickable);
payment_clickable = findViewById(R.id.payment_clickable);
Intent intent = getIntent();
Username = (TextView)findViewById(R.id.test);
// Receiving User Email Send By MainActivity.
Bundle bundle = intent.getExtras();
UsernameHolder = bundle.getString("username");
// Setting up received email to TextView.
Username.setText("Hi, " + UsernameHolder);
setSupportActionBar(toolbar);
/* getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);*/
getSupportActionBar().setDisplayShowTitleEnabled(false);
navigationView.bringToFront();
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this,drawerLayout,toolbar,R.string.navigation_drawer_open,R.string.navigation_drawer_close);
drawerLayout.addDrawerListener(toggle);
toggle.syncState();
navigationView.setNavigationItemSelectedListener(this);
navigationView.setCheckedItem(R.id.nav_home);
//museum click
museum_clickable.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Main_page.this, Museums.class);
startActivity(intent);
}
});
souvenir_clickable.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Main_page.this, Souvenir.class);
startActivity(intent);
}
});
caffee_clickable.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Main_page.this, Caffee.class);
startActivity(intent);
}
});
payment_clickable.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Main_page.this, Pay.class);
startActivity(intent);
}
});
}
@Override
public void onBackPressed() {
if(drawerLayout.isDrawerOpen(GravityCompat.START)){
drawerLayout.closeDrawer(GravityCompat.START);
}
else{
super.onBackPressed();
}
}
@Override
public boolean onNavigationItemSelected(@NonNull MenuItem menuItem) {
switch (menuItem.getItemId()){
case R.id.nav_home:
break;
case R.id.nav_museums:
Intent intent = new Intent(Main_page.this,Museums.class);
startActivity(intent);
break;
case R.id.nav_coffee:
Intent intent2 = new Intent(Main_page.this,Caffee.class);
startActivity(intent2);
break;
case R.id.nav_souvenir_shop:
Intent intent3 = new Intent(Main_page.this,Souvenir.class);
startActivity(intent3);
break;
case R.id.nav_payment:
Intent intent4 = new Intent(Main_page.this,Pay.class);
startActivity(intent4);
break;
case R.id.nav_share:
Toast.makeText(this,"Share",Toast.LENGTH_SHORT).show();
break;
case R.id.nav_logout:
Intent intent5 = new Intent(Main_page.this,MainActivity.class);
startActivity(intent5);
break;
}
drawerLayout.closeDrawer(GravityCompat.START);
return true;
}
@Override
public void onPointerCaptureChanged(boolean hasCapture) {
}
}
package com.example.museum2;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
public class Metropolitan extends AppCompatActivity {
ImageView backbtn;
Button booking;
String BookingHolder;
TextView Booking_text;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_metropolitan);
backbtn = findViewById(R.id.back_pressed);
booking = findViewById(R.id.booking);
Booking_text = findViewById(R.id.ny_text);
BookingHolder = Booking_text.getText().toString();
backbtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Metropolitan.super.onBackPressed();
}
});
booking.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// Going to Dashboard activity after login success message.
Intent intent = new Intent(Metropolitan.this, Booking.class);
// Sending username to Main page using intent.
intent.putExtra("nume_muzeu", BookingHolder);
Singleton_variable.getInstance().setSingleton(BookingHolder);
Singleton_variable.getmInstance5().setSingleton_museum(BookingHolder);
startActivity(intent);
}
});
}
}
\ No newline at end of file
package com.example.museum2;
public class Model {
String mDrinkName;
String mDrinkDetail;
int mDrinkPhoto;
public Model(String mDrinkName, String mDrinkDetail, int mDrinkPhoto) {
this.mDrinkName = mDrinkName;
this.mDrinkDetail = mDrinkDetail;
this.mDrinkPhoto = mDrinkPhoto;
}
public String getmDrinkName() {
return mDrinkName;
}
public String getmDrinkDetail() {
return mDrinkDetail;
}
public int getmDrinkPhoto() {
return mDrinkPhoto;
}
}
package com.example.museum2;
import android.app.LoaderManager;
import android.content.ContentValues;
import android.content.CursorLoader;
import android.content.Intent;
import android.content.Loader;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class Mug extends AppCompatActivity implements LoaderManager.LoaderCallbacks<Cursor> {
ImageView imageView;
ImageButton plusquantity, minusquantity;
TextView quantitynumber, drinnkName, coffeePrice;
Button addtoCart;
int quantity;
public Uri mCurrentCartUri;
boolean hasAllRequiredValues = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_mug);
imageView = findViewById(R.id.imageViewInfo);
plusquantity = findViewById(R.id.addquantity);
minusquantity = findViewById(R.id.subquantity);
quantitynumber = findViewById(R.id.quantity);
drinnkName = findViewById(R.id.drinkNameinInfo);
coffeePrice = findViewById(R.id.coffeePrice);
addtoCart = findViewById(R.id.addtocart);
// setting the name of drink
drinnkName.setText("Mug");
addtoCart.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Mug.this, SummaryActivity.class);
String price_test = coffeePrice.getText().toString();
intent.putExtra("price_test", price_test);
Singleton_variable.getInstance().setSingleton("no museum");
startActivity(intent);
// once this button is clicked we want to save our values in the database and send those values
// right away to summary activity where we display the order info
SaveCart();
}
});
plusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// coffee price
int basePrice = 5;
quantity++;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
});
minusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int basePrice = 5;
// because we dont want the quantity go less than 0
if (quantity == 0) {
Toast.makeText(Mug.this, "Cant decrease quantity < 0", Toast.LENGTH_SHORT).show();
} else {
quantity--;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
}
});
}
private boolean SaveCart() {
// getting the values from our views
String name = drinnkName.getText().toString();
String price = coffeePrice.getText().toString();
String quantity = quantitynumber.getText().toString();
ContentValues values = new ContentValues();
values.put(OrderContract.OrderEntry.COLUMN_NAME, name);
values.put(OrderContract.OrderEntry.COLUMN_PRICE, price);
values.put(OrderContract.OrderEntry.COLUMN_QUANTITY, quantity);
if (mCurrentCartUri == null) {
Uri newUri = getContentResolver().insert(OrderContract.OrderEntry.CONTENT_URI, values);
if (newUri==null) {
Toast.makeText(this, "Failed to add to Cart", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, "Success adding to Cart", Toast.LENGTH_SHORT).show();
}
}
hasAllRequiredValues = true;
return hasAllRequiredValues;
}
private void displayQuantity() {
quantitynumber.setText(String.valueOf(quantity));
}
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
String[] projection = {OrderContract.OrderEntry._ID,
OrderContract.OrderEntry.COLUMN_NAME,
OrderContract.OrderEntry.COLUMN_PRICE,
OrderContract.OrderEntry.COLUMN_QUANTITY,
};
return new CursorLoader(this, mCurrentCartUri,
projection,
null,
null,
null);
}
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
if (cursor == null || cursor.getCount() < 1) {
return;
}
if (cursor.moveToFirst()) {
int name = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_NAME);
int price = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_PRICE);
int quantity = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_QUANTITY);
String nameofdrink = cursor.getString(name);
String priceofdrink = cursor.getString(price);
String quantityofdrink = cursor.getString(quantity);
drinnkName.setText(nameofdrink);
coffeePrice.setText(priceofdrink);
quantitynumber.setText(quantityofdrink);
}
}
@Override
public void onLoaderReset(Loader<Cursor> loader) {
drinnkName.setText("");
coffeePrice.setText("");
quantitynumber.setText("");
}
}
\ No newline at end of file
package com.example.museum2;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.ImageView;
public class Museums extends AppCompatActivity {
ImageView backBtn;
Button expand_louvre,expand_china,expand_vatican,expand_metropolitan,expand_british,expand_tate,expand_gallery,expand_history,expand_american,expand_rusia;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_museums);
backBtn = findViewById(R.id.back_pressed);
expand_louvre = findViewById(R.id.expand_louvre);
expand_china=findViewById(R.id.expand_china);
expand_vatican=findViewById(R.id.expand_vatican);
expand_metropolitan=findViewById(R.id.expand_metropolitan);
expand_british=findViewById(R.id.expand_british);
expand_tate=findViewById(R.id.expand_tate);
expand_gallery=findViewById(R.id.expand_gallery);
expand_history=findViewById(R.id.expand_history);
expand_american=findViewById(R.id.expand_american);
expand_rusia=findViewById(R.id.expand_rusia);
backBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Museums.super.onBackPressed();
}
});
//museum click
expand_louvre.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Museums.this, Louvre.class);
startActivity(intent);
}
});
expand_china.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Museums.this, China.class);
startActivity(intent);
}
});
expand_vatican.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Museums.this, Vatican.class);
startActivity(intent);
}
});
expand_metropolitan.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Museums.this, Metropolitan.class);
startActivity(intent);
}
});
expand_british.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Museums.this, British.class);
startActivity(intent);
}
});
expand_tate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Museums.this, Tate.class);
startActivity(intent);
}
});
expand_gallery.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Museums.this, Gallery.class);
startActivity(intent);
}
});
expand_history.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Museums.this, History.class);
startActivity(intent);
}
});
expand_american.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Museums.this, American.class);
startActivity(intent);
}
});
expand_rusia.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Museums.this, Russia.class);
startActivity(intent);
}
});
}
}
\ No newline at end of file
package com.example.museum2;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
public class OrderAdapter extends RecyclerView.Adapter<OrderAdapter.ViewHolder> {
List<Model> modelList;
Context context;
public OrderAdapter(Context context, List<Model> modelList) {
this.context = context;
this.modelList = modelList;
}
@Override
public ViewHolder onCreateViewHolder( ViewGroup parent, int i) {
View view = LayoutInflater.from(context).inflate(R.layout.listitem, parent, false);
return new ViewHolder(view);
}
@Override
public void onBindViewHolder( ViewHolder holder, int position) {
// here we will find the position and start setting the output on our views
String nameofDrink = modelList.get(position).getmDrinkName();
String descriptionofdrink = modelList.get(position).getmDrinkDetail();
int images = modelList.get(position).getmDrinkPhoto();
holder.mDrinkName.setText(nameofDrink);
holder.mDrinkDescription.setText(descriptionofdrink);
holder.imageView.setImageResource(images);
}
@Override
public int getItemCount() {
return modelList.size();
}
// in order to make our views responsive we can implement onclicklistener on our recyclerview
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
// here we will find the views on which we will inflate our data
TextView mDrinkName, mDrinkDescription;
ImageView imageView;
public ViewHolder(View itemView) {
super(itemView);
mDrinkName = itemView.findViewById(R.id.teaName);
mDrinkDescription = itemView.findViewById(R.id.description);
imageView = itemView.findViewById(R.id.teaImage);
itemView.setOnClickListener(this);
}
@Override
public void onClick(View v) {
// lets get the position of the view in list and then work on it
int position = getAdapterPosition();
if (position == 0) {
Intent intent = new Intent(context, InfoActivity.class);
context.startActivity(intent);
}
if (position == 1) {
Intent intent2 = new Intent(context, Water.class);
context.startActivity(intent2);
}
if (position == 2) {
Intent intent3 = new Intent(context, Coffee.class);
context.startActivity(intent3);
}
if (position == 3) {
Intent intent4 = new Intent(context, Flatbread.class);
context.startActivity(intent4);
}
if (position == 4) {
Intent intent5 = new Intent(context, Sandwich.class);
context.startActivity(intent5);
}
if (position == 5) {
Intent intent6 = new Intent(context, Sweetroll.class);
context.startActivity(intent6);
}
if (position == 6) {
Intent intent7 = new Intent(context, Salad.class);
context.startActivity(intent7);
}
if (position == 7) {
Intent intent8 = new Intent(context, Shirt.class);
context.startActivity(intent8);
}
}
}
}
\ No newline at end of file
package com.example.museum2;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
public class OrderAdapter2 extends RecyclerView.Adapter<OrderAdapter2.ViewHolder> {
List<Model> modelList;
Context context;
public OrderAdapter2 (Context context, List<Model> modelList) {
this.context = context;
this.modelList = modelList;
}
@Override
public ViewHolder onCreateViewHolder( ViewGroup parent, int i) {
View view = LayoutInflater.from(context).inflate(R.layout.listitem2, parent, false);
return new ViewHolder(view);
}
@Override
public void onBindViewHolder( ViewHolder holder, int position) {
// here we will find the position and start setting the output on our views
String nameofDrink = modelList.get(position).getmDrinkName();
String descriptionofdrink = modelList.get(position).getmDrinkDetail();
int images = modelList.get(position).getmDrinkPhoto();
holder.mDrinkName.setText(nameofDrink);
holder.mDrinkDescription.setText(descriptionofdrink);
holder.imageView.setImageResource(images);
}
@Override
public int getItemCount() {
return modelList.size();
}
// in order to make our views responsive we can implement onclicklistener on our recyclerview
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
// here we will find the views on which we will inflate our data
TextView mDrinkName, mDrinkDescription;
ImageView imageView;
public ViewHolder(View itemView) {
super(itemView);
mDrinkName = itemView.findViewById(R.id.teaName);
mDrinkDescription = itemView.findViewById(R.id.description);
imageView = itemView.findViewById(R.id.teaImage);
itemView.setOnClickListener(this);
}
@Override
public void onClick(View v) {
// lets get the position of the view in list and then work on it
int position = getAdapterPosition();
if (position == 0) {
Intent intent = new Intent(context, Shirt.class);
context.startActivity(intent);
}
if (position == 1) {
Intent intent2 = new Intent(context, Hat.class);
context.startActivity(intent2);
}
if (position == 2) {
Intent intent3 = new Intent(context, Snowglobe.class);
context.startActivity(intent3);
}
if (position == 3) {
Intent intent4 = new Intent(context, Keychain.class);
context.startActivity(intent4);
}
if (position == 4) {
Intent intent5 = new Intent(context, Bottle.class);
context.startActivity(intent5);
}
if (position == 5) {
Intent intent6 = new Intent(context, Mug.class);
context.startActivity(intent6);
}
if (position == 6) {
Intent intent7 = new Intent(context, Coaster.class);
context.startActivity(intent7);
}
}
}
}
\ No newline at end of file
package com.example.museum2;
import android.net.Uri;
import android.provider.BaseColumns;
public class OrderContract {
public OrderContract() {
}
// contentauthority requires you to enter your package name
public static final String CONTENT_AUTHORITY = "com.example.museum2";
public static final Uri BASE_URI = Uri.parse("content://" + CONTENT_AUTHORITY);
// this should be similar to your table name
public static final String PATH = "orderig1";
public static abstract class OrderEntry implements BaseColumns{
public static final Uri CONTENT_URI = Uri.withAppendedPath(BASE_URI, PATH);
public static final String TABLE_NAME = "orderig1";
public static final String _ID = BaseColumns._ID;
public static final String COLUMN_NAME = "name";
public static final String COLUMN_QUANTITY = "quantity";
public static final String COLUMN_PRICE = "price";
}
}
\ No newline at end of file
package com.example.museum2;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
public class OrderHelper extends SQLiteOpenHelper {
public static final int DATABASE_VERSION = 1;
public static final String DATABSE_NAME = "ord.db2";
public OrderHelper(Context context) {
super(context, DATABSE_NAME, null, DATABASE_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
String SQL_TABLE = "CREATE TABLE IF NOT EXISTS " + OrderContract.OrderEntry.TABLE_NAME + " ("
+ OrderContract.OrderEntry._ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
+ OrderContract.OrderEntry.COLUMN_NAME + " TEXT NOT NULL, "
+ OrderContract.OrderEntry.COLUMN_QUANTITY + " TEXT NOT NULL, "
+ OrderContract.OrderEntry.COLUMN_PRICE + " TEXT NOT NULL);";
db.execSQL(SQL_TABLE);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
}
}
\ No newline at end of file
package com.example.museum2;
import android.content.ContentProvider;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.UriMatcher;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.net.Uri;
public class OrderProvider extends ContentProvider {
// this constant is needed in order to define the path of our modification in the table
public static final int ORDER = 100;
public static UriMatcher sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
static {
sUriMatcher.addURI(OrderContract.CONTENT_AUTHORITY, OrderContract.PATH, ORDER);
}
public OrderHelper mHelper;
@Override
public boolean onCreate() {
mHelper = new OrderHelper(getContext());
return true;
}
@Override
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
// since we are querying from the database
SQLiteDatabase database = mHelper.getReadableDatabase();
Cursor cursor;
int match = sUriMatcher.match(uri);
switch (match) {
case ORDER:
cursor = database.query(OrderContract.OrderEntry.TABLE_NAME, projection, selection, selectionArgs, null, null, sortOrder);
break;
default:
throw new IllegalArgumentException("CANT QUERY");
}
cursor.setNotificationUri(getContext().getContentResolver(), uri);
return cursor;
}
@Override
public String getType( Uri uri) {
return null;
}
@Override
public Uri insert(Uri uri, ContentValues values) {
int match = sUriMatcher.match(uri);
switch (match) {
case ORDER:
return insertCart(uri, values);
default:
throw new IllegalArgumentException("Cant insert data");
}
}
private Uri insertCart(Uri uri, ContentValues values) {
String name = values.getAsString(OrderContract.OrderEntry.COLUMN_NAME);
if(name == null) {
throw new IllegalArgumentException("Name is Required");
}
String quantity = values.getAsString(OrderContract.OrderEntry.COLUMN_QUANTITY);
if(quantity == null) {
throw new IllegalArgumentException("quantity is Required");
}
String price = values.getAsString(OrderContract.OrderEntry.COLUMN_PRICE);
if(price == null) {
throw new IllegalArgumentException("price is Required");
}
// SINCE WE ARE INSERTING DATA IN DATABASE SO NOW WE ARE WRITING ON DATABASE
SQLiteDatabase database = mHelper.getWritableDatabase();
long id = database.insert(OrderContract.OrderEntry.TABLE_NAME, null, values);
if (id == -1) {
return null;
}
getContext().getContentResolver().notifyChange(uri, null);
return ContentUris.withAppendedId(uri, id);
}
@Override
public int delete( Uri uri, String selection, String[] selectionArgs) {
// we will use this to clear the data once order is made
int rowsDeleted;
SQLiteDatabase database = mHelper.getWritableDatabase();
int match = sUriMatcher.match(uri);
switch (match) {
case ORDER:
rowsDeleted = database.delete(OrderContract.OrderEntry.TABLE_NAME, selection, selectionArgs);
break;
default:
throw new IllegalArgumentException("Cannot delete");
}
if (rowsDeleted!=0) {
getContext().getContentResolver().notifyChange(uri, null);
}
return rowsDeleted;
}
@Override
public int update( Uri uri, ContentValues values, String selection, String[] selectionArgs) {
return 0;
}
}
\ No newline at end of file
package com.example.museum2;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import java.util.Random;
public class Pay extends AppCompatActivity {
TextView date_appointent,time, name,muzeu,total,change,random;
String dateHolder,timeHolder, nameHolder,muzeuHolder,amountHolder;
EditText amount;
Button pay3;
int totalHolder;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pay);
amount = findViewById(R.id.amount);
change = findViewById(R.id.show_change);
random = findViewById(R.id.random);
amountHolder = amount.getText().toString();
pay3 = findViewById(R.id.payy);
date_appointent = findViewById(R.id.date_appointment);
dateHolder = Singleton_variable.getInstance2().getSingleton_date();
date_appointent.setText("Your appointment is on: " + dateHolder);
time = findViewById(R.id.time);
timeHolder = Singleton_variable.getInstance3().getSingleton_time();
time.setText("At: "+timeHolder);
muzeu = findViewById(R.id.muzeu);
muzeuHolder = Singleton_variable.getmInstance5().getSingleton_museum();
muzeu.setText("Museum: " + muzeuHolder);
name = findViewById(R.id.name_user);
nameHolder = Singleton_variable.getmInstance4().getSingleton_name();
name.setText("Name: " + nameHolder);
total = findViewById(R.id.total);
totalHolder = Singleton_variable.getmInstance6().getSingleton_total_sum();
total.setText("FINAL PAYMENT AMOUNT: £" + totalHolder);
pay3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
int value = Integer.parseInt(amount.getText().toString());
String randomm = getRandomNumberString();
int changee;
if( value > totalHolder){
changee = value - totalHolder;
change.setText("Your change is:£ " + changee);
random.setText("Your booking code is: "+randomm);
}
else if (value < totalHolder){
change.setText("Insufficient money");
random.setText("");
}
else if (value == totalHolder){
change.setText("Thank you. Can't wait to see you again");
random.setText("Your booking code is: "+randomm);
}
else{
change.setText("Enter money");
random.setText("");
}
}
});
}
public static String getRandomNumberString() {
// It will generate 6 digit random Number.
// from 0 to 999999
Random rnd = new Random();
int number = rnd.nextInt(999999);
// this will convert any number sequence into 6 character.
return String.format("%06d", number);
}
}
\ No newline at end of file
package com.example.museum2;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class RegisterActivity extends AppCompatActivity {
EditText Username, Password, Name ;
Button Register;
String NameHolder, UsernameHolder, PasswordHolder;
Boolean EditTextEmptyHolder;
SQLiteDatabase sqLiteDatabaseObj;
String SQLiteDataBaseQueryHolder ;
SQLiteHelper sqLiteHelper;
Cursor cursor;
String F_Result = "Not_Found";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_register);
Register = (Button)findViewById(R.id.buttonRegister);
Username = (EditText)findViewById(R.id.editusername_signup);
Password = (EditText)findViewById(R.id.editPassword_signup);
Name = (EditText)findViewById(R.id.editname_signup);
sqLiteHelper = new SQLiteHelper(this);
// Adding click listener to register button.
Register.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// Creating SQLite database if dose n't exists
SQLiteDataBaseBuild();
// Creating SQLite table if dose n't exists.
SQLiteTableBuild();
// Checking EditText is empty or Not.
CheckEditTextStatus();
// Method to check username is already exists or not.
CheckingUsernameAlreadyExistsOrNot();
// Empty EditText After done inserting process.
EmptyEditTextAfterDataInsert();
}
});
}
// SQLite database build method.
public void SQLiteDataBaseBuild(){
sqLiteDatabaseObj = openOrCreateDatabase(SQLiteHelper.DATABASE_NAME, Context.MODE_PRIVATE, null);
}
// SQLite table build method.
public void SQLiteTableBuild() {
sqLiteDatabaseObj.execSQL("CREATE TABLE IF NOT EXISTS " + SQLiteHelper.TABLE_NAME + "(" + SQLiteHelper.Table_Column_ID + " PRIMARY KEY AUTOINCREMENT NOT NULL, " + SQLiteHelper.Table_Column_1_Name + " VARCHAR, " + SQLiteHelper.Table_Column_2_Username + " VARCHAR, " + SQLiteHelper.Table_Column_3_Password + " VARCHAR);");
}
// Insert data into SQLite database method.
public void InsertDataIntoSQLiteDatabase(){
// If editText is not empty then this block will executed.
if(EditTextEmptyHolder == true)
{
// SQLite query to insert data into table.
SQLiteDataBaseQueryHolder = "INSERT INTO "+SQLiteHelper.TABLE_NAME+" (name,username,password) VALUES('"+NameHolder+"', '"+UsernameHolder+"', '"+PasswordHolder+"');";
// Executing query.
sqLiteDatabaseObj.execSQL(SQLiteDataBaseQueryHolder);
// Closing SQLite database object.
sqLiteDatabaseObj.close();
// Printing toast message after done inserting.
Toast.makeText(RegisterActivity.this,"User Registered Successfully", Toast.LENGTH_LONG).show();
// Opening new user registration activity using intent on button click.
Intent intent = new Intent(RegisterActivity.this, MainActivity.class);
startActivity(intent);
}
// This block will execute if any of the registration EditText is empty.
else {
// Printing toast message if any of EditText is empty.
Toast.makeText(RegisterActivity.this,"Please Fill All The Required Fields.", Toast.LENGTH_LONG).show();
}
}
// Empty edittext after done inserting process method.
public void EmptyEditTextAfterDataInsert(){
Name.getText().clear();
Username.getText().clear();
Password.getText().clear();
}
// Method to check EditText is empty or Not.
public void CheckEditTextStatus(){
// Getting value from All EditText and storing into String Variables.
NameHolder = Name.getText().toString() ;
UsernameHolder = Username.getText().toString();
PasswordHolder = Password.getText().toString();
if(TextUtils.isEmpty(NameHolder) || TextUtils.isEmpty(UsernameHolder) || TextUtils.isEmpty(PasswordHolder)){
EditTextEmptyHolder = false ;
}
else {
EditTextEmptyHolder = true ;
}
}
// Checking username is already exists or not.
public void CheckingUsernameAlreadyExistsOrNot(){
// Opening SQLite database write permission.
sqLiteDatabaseObj = sqLiteHelper.getWritableDatabase();
// Adding search username query to cursor.
cursor = sqLiteDatabaseObj.query(SQLiteHelper.TABLE_NAME, null, " " + SQLiteHelper.Table_Column_2_Username + "=?", new String[]{UsernameHolder}, null, null, null);
while (cursor.moveToNext()) {
if (cursor.isFirst()) {
cursor.moveToFirst();
// If username is already exists then Result variable value set as username Found.
F_Result = "Username Found";
// Closing cursor.
cursor.close();
}
}
// Calling method to check final result and insert data into SQLite database.
CheckFinalResult();
}
// Checking result
public void CheckFinalResult(){
// Checking whether username is already exists or not.
if(F_Result.equalsIgnoreCase("Username Found"))
{
// If username is exists then toast msg will display.
Toast.makeText(RegisterActivity.this,"Username Already Exists",Toast.LENGTH_LONG).show();
}
else {
// If username already dose n't exists then user registration details will entered to SQLite database.
InsertDataIntoSQLiteDatabase();
}
F_Result = "Not_Found" ;
}
}
\ No newline at end of file
package com.example.museum2;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
public class Russia extends AppCompatActivity {
ImageView backbtn;
Button booking;
String BookingHolder;
TextView Booking_text;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_russia);
backbtn = findViewById(R.id.back_pressed);
booking = findViewById(R.id.booking);
Booking_text = findViewById(R.id.russia_text);
BookingHolder = Booking_text.getText().toString();
backbtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Russia.super.onBackPressed();
}
});
booking.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// Going to Dashboard activity after login success message.
Intent intent = new Intent(Russia.this, Booking.class);
// Sending username to Main page using intent.
intent.putExtra("nume_muzeu", BookingHolder);
Singleton_variable.getInstance().setSingleton(BookingHolder);
Singleton_variable.getmInstance5().setSingleton_museum(BookingHolder);
startActivity(intent);
}
});
}
}
\ No newline at end of file
package com.example.museum2;
import android.content.Context;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteDatabase;
class SQLiteHelper extends SQLiteOpenHelper{
static String DATABASE_NAME="UserDataBase2";
public static final String TABLE_NAME="UserTable2";
public static final String Table_Column_ID="id";
public static final String Table_Column_1_Name="name";
public static final String Table_Column_2_Username="username";
public static final String Table_Column_3_Password="password";
public SQLiteHelper(Context context) {
super(context, DATABASE_NAME, null, 1);
}
@Override
public void onCreate(SQLiteDatabase database) {
String CREATE_TABLE="CREATE TABLE IF NOT EXISTS "+TABLE_NAME+" ("+Table_Column_ID+"INTEGER PRIMARY KEY, "+Table_Column_1_Name+" VARCHAR, "+Table_Column_2_Username+" VARCHAR, "+Table_Column_3_Password+" VARCHAR)";
database.execSQL(CREATE_TABLE);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("DROP TABLE IF EXISTS "+TABLE_NAME);
onCreate(db);
}
}
\ No newline at end of file
package com.example.museum2;
import android.app.LoaderManager;
import android.content.ContentValues;
import android.content.CursorLoader;
import android.content.Intent;
import android.content.Loader;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class Salad extends AppCompatActivity implements LoaderManager.LoaderCallbacks<Cursor> {
ImageView imageView;
ImageButton plusquantity, minusquantity;
TextView quantitynumber, drinnkName, coffeePrice;
Button addtoCart;
int quantity;
public Uri mCurrentCartUri;
boolean hasAllRequiredValues = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_salad);
imageView = findViewById(R.id.imageViewInfo);
plusquantity = findViewById(R.id.addquantity);
minusquantity = findViewById(R.id.subquantity);
quantitynumber = findViewById(R.id.quantity);
drinnkName = findViewById(R.id.drinkNameinInfo);
coffeePrice = findViewById(R.id.coffeePrice);
addtoCart = findViewById(R.id.addtocart);
// setting the name of drink
drinnkName.setText("Salad");
addtoCart.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Salad.this, SummaryActivity.class);
String price_test = coffeePrice.getText().toString();
intent.putExtra("price_test", price_test);
Singleton_variable.getInstance().setSingleton("no museum");
startActivity(intent);
// once this button is clicked we want to save our values in the database and send those values
// right away to summary activity where we display the order info
SaveCart();
}
});
plusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// coffee price
int basePrice = 2;
quantity++;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
});
minusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int basePrice = 2;
// because we dont want the quantity go less than 0
if (quantity == 0) {
Toast.makeText(Salad.this, "Cant decrease quantity < 0", Toast.LENGTH_SHORT).show();
} else {
quantity--;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
}
});
}
private boolean SaveCart() {
// getting the values from our views
String name = drinnkName.getText().toString();
String price = coffeePrice.getText().toString();
String quantity = quantitynumber.getText().toString();
ContentValues values = new ContentValues();
values.put(OrderContract.OrderEntry.COLUMN_NAME, name);
values.put(OrderContract.OrderEntry.COLUMN_PRICE, price);
values.put(OrderContract.OrderEntry.COLUMN_QUANTITY, quantity);
if (mCurrentCartUri == null) {
Uri newUri = getContentResolver().insert(OrderContract.OrderEntry.CONTENT_URI, values);
if (newUri==null) {
Toast.makeText(this, "Failed to add to Cart", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, "Success adding to Cart", Toast.LENGTH_SHORT).show();
}
}
hasAllRequiredValues = true;
return hasAllRequiredValues;
}
private void displayQuantity() {
quantitynumber.setText(String.valueOf(quantity));
}
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
String[] projection = {OrderContract.OrderEntry._ID,
OrderContract.OrderEntry.COLUMN_NAME,
OrderContract.OrderEntry.COLUMN_PRICE,
OrderContract.OrderEntry.COLUMN_QUANTITY,
};
return new CursorLoader(this, mCurrentCartUri,
projection,
null,
null,
null);
}
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
if (cursor == null || cursor.getCount() < 1) {
return;
}
if (cursor.moveToFirst()) {
int name = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_NAME);
int price = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_PRICE);
int quantity = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_QUANTITY);
String nameofdrink = cursor.getString(name);
String priceofdrink = cursor.getString(price);
String quantityofdrink = cursor.getString(quantity);
drinnkName.setText(nameofdrink);
coffeePrice.setText(priceofdrink);
quantitynumber.setText(quantityofdrink);
}
}
@Override
public void onLoaderReset(Loader<Cursor> loader) {
drinnkName.setText("");
coffeePrice.setText("");
quantitynumber.setText("");
}
}
\ No newline at end of file
package com.example.museum2;
import android.app.LoaderManager;
import android.content.ContentValues;
import android.content.CursorLoader;
import android.content.Intent;
import android.content.Loader;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class Sandwich extends AppCompatActivity implements LoaderManager.LoaderCallbacks<Cursor> {
ImageView imageView;
ImageButton plusquantity, minusquantity;
TextView quantitynumber, drinnkName, coffeePrice;
Button addtoCart;
int quantity;
public Uri mCurrentCartUri;
boolean hasAllRequiredValues = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sandwich);
imageView = findViewById(R.id.imageViewInfo);
plusquantity = findViewById(R.id.addquantity);
minusquantity = findViewById(R.id.subquantity);
quantitynumber = findViewById(R.id.quantity);
drinnkName = findViewById(R.id.drinkNameinInfo);
coffeePrice = findViewById(R.id.coffeePrice);
addtoCart = findViewById(R.id.addtocart);
// setting the name of drink
drinnkName.setText("Sandwich");
addtoCart.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Sandwich.this, SummaryActivity.class);
String price_test = coffeePrice.getText().toString();
intent.putExtra("price_test", price_test);
Singleton_variable.getInstance().setSingleton("no museum");
startActivity(intent);
// once this button is clicked we want to save our values in the database and send those values
// right away to summary activity where we display the order info
SaveCart();
}
});
plusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// coffee price
int basePrice = 2;
quantity++;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
});
minusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int basePrice = 2;
// because we dont want the quantity go less than 0
if (quantity == 0) {
Toast.makeText(Sandwich.this, "Cant decrease quantity < 0", Toast.LENGTH_SHORT).show();
} else {
quantity--;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
}
});
}
private boolean SaveCart() {
// getting the values from our views
String name = drinnkName.getText().toString();
String price = coffeePrice.getText().toString();
String quantity = quantitynumber.getText().toString();
ContentValues values = new ContentValues();
values.put(OrderContract.OrderEntry.COLUMN_NAME, name);
values.put(OrderContract.OrderEntry.COLUMN_PRICE, price);
values.put(OrderContract.OrderEntry.COLUMN_QUANTITY, quantity);
if (mCurrentCartUri == null) {
Uri newUri = getContentResolver().insert(OrderContract.OrderEntry.CONTENT_URI, values);
if (newUri==null) {
Toast.makeText(this, "Failed to add to Cart", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, "Success adding to Cart", Toast.LENGTH_SHORT).show();
}
}
hasAllRequiredValues = true;
return hasAllRequiredValues;
}
private void displayQuantity() {
quantitynumber.setText(String.valueOf(quantity));
}
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
String[] projection = {OrderContract.OrderEntry._ID,
OrderContract.OrderEntry.COLUMN_NAME,
OrderContract.OrderEntry.COLUMN_PRICE,
OrderContract.OrderEntry.COLUMN_QUANTITY,
};
return new CursorLoader(this, mCurrentCartUri,
projection,
null,
null,
null);
}
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
if (cursor == null || cursor.getCount() < 1) {
return;
}
if (cursor.moveToFirst()) {
int name = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_NAME);
int price = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_PRICE);
int quantity = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_QUANTITY);
String nameofdrink = cursor.getString(name);
String priceofdrink = cursor.getString(price);
String quantityofdrink = cursor.getString(quantity);
drinnkName.setText(nameofdrink);
coffeePrice.setText(priceofdrink);
quantitynumber.setText(quantityofdrink);
}
}
@Override
public void onLoaderReset(Loader<Cursor> loader) {
drinnkName.setText("");
coffeePrice.setText("");
quantitynumber.setText("");
}
}
\ No newline at end of file
package com.example.museum2;
import android.app.LoaderManager;
import android.content.ContentValues;
import android.content.CursorLoader;
import android.content.Intent;
import android.content.Loader;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class Shirt extends AppCompatActivity implements LoaderManager.LoaderCallbacks<Cursor> {
// first of all we will get the views that are present in the layout of info
ImageView imageView;
ImageButton plusquantity, minusquantity;
TextView quantitynumber, drinnkName, coffeePrice;
Button addtoCart;
int quantity;
public Uri mCurrentCartUri;
boolean hasAllRequiredValues = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_shirt);
imageView = findViewById(R.id.imageViewInfo);
plusquantity = findViewById(R.id.addquantity);
minusquantity = findViewById(R.id.subquantity);
quantitynumber = findViewById(R.id.quantity);
drinnkName = findViewById(R.id.drinkNameinInfo);
coffeePrice = findViewById(R.id.coffeePrice);
addtoCart = findViewById(R.id.addtocart);
// setting the name of drink
drinnkName.setText("Shirt");
addtoCart.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Shirt.this, SummaryActivity.class);
String price_test = coffeePrice.getText().toString();
intent.putExtra("price_test", price_test);
Singleton_variable.getInstance().setSingleton("no museum");
startActivity(intent);
// once this button is clicked we want to save our values in the database and send those values
// right away to summary activity where we display the order info
SaveCart();
}
});
plusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// coffee price
int basePrice = 10;
quantity++;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
});
minusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int basePrice = 10;
// because we dont want the quantity go less than 0
if (quantity == 0) {
Toast.makeText(Shirt.this, "Cant decrease quantity < 0", Toast.LENGTH_SHORT).show();
} else {
quantity--;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
}
});
}
private boolean SaveCart() {
// getting the values from our views
String name = drinnkName.getText().toString();
String price = coffeePrice.getText().toString();
String quantity = quantitynumber.getText().toString();
ContentValues values = new ContentValues();
values.put(OrderContract.OrderEntry.COLUMN_NAME, name);
values.put(OrderContract.OrderEntry.COLUMN_PRICE, price);
values.put(OrderContract.OrderEntry.COLUMN_QUANTITY, quantity);
if (mCurrentCartUri == null) {
Uri newUri = getContentResolver().insert(OrderContract.OrderEntry.CONTENT_URI, values);
if (newUri==null) {
Toast.makeText(this, "Failed to add to Cart", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, "Success adding to Cart", Toast.LENGTH_SHORT).show();
}
}
hasAllRequiredValues = true;
return hasAllRequiredValues;
}
private void displayQuantity() {
quantitynumber.setText(String.valueOf(quantity));
}
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
String[] projection = {OrderContract.OrderEntry._ID,
OrderContract.OrderEntry.COLUMN_NAME,
OrderContract.OrderEntry.COLUMN_PRICE,
OrderContract.OrderEntry.COLUMN_QUANTITY,
};
return new CursorLoader(this, mCurrentCartUri,
projection,
null,
null,
null);
}
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
if (cursor == null || cursor.getCount() < 1) {
return;
}
if (cursor.moveToFirst()) {
int name = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_NAME);
int price = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_PRICE);
int quantity = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_QUANTITY);
String nameofdrink = cursor.getString(name);
String priceofdrink = cursor.getString(price);
String quantityofdrink = cursor.getString(quantity);
drinnkName.setText(nameofdrink);
coffeePrice.setText(priceofdrink);
quantitynumber.setText(quantityofdrink);
}
}
@Override
public void onLoaderReset(Loader<Cursor> loader) {
drinnkName.setText("");
coffeePrice.setText("");
quantitynumber.setText("");
}
}
\ No newline at end of file
package com.example.museum2;
import java.util.ArrayList;
public class Singleton {
private static Singleton mInstance;
private ArrayList<Integer> list = null;
public static Singleton getInstance() {
if(mInstance == null)
mInstance = new Singleton();
return mInstance;
}
private Singleton() {
list = new ArrayList<Integer>();
}
// retrieve array from anywhere
public ArrayList<Integer> getArray() {
return this.list;
}
//Add element to array
public void addToArray(int value) {
list.add(value);
}
public int sum() {
int sum = 0;
for (int i : list)
sum = sum + i;
return sum;
}
public void delete() {
list.clear();
}
}
package com.example.museum2;
public class Singleton_variable {
private static Singleton_variable mInstance;
private String name;
// other instance variables can be here
public static Singleton_variable getInstance() {
if(mInstance == null)
mInstance = new Singleton_variable();
return mInstance;
}
public String getSingleton() {
return name;
}
public void setSingleton(String newName) {
this.name = newName;
}
private static Singleton_variable mInstance2;
// other instance variables can be here
private String date;
public static Singleton_variable getInstance2() {
if(mInstance2 == null)
mInstance2 = new Singleton_variable();
return mInstance2;
}
public void setSingleton_date(String newDate) {
this.date = newDate;
}
public String getSingleton_date() {
return date;
}
private static Singleton_variable mInstance3;
// other instance variables can be here
private String time;
public static Singleton_variable getInstance3() {
if(mInstance3 == null)
mInstance3 = new Singleton_variable();
return mInstance3;
}
public void setSingleton_time(String newTime) {
this.time = newTime;
}
public String getSingleton_time() {
return time;
}
private static Singleton_variable mInstance4;
// other instance variables can be here
private String name_user;
public static Singleton_variable getmInstance4() {
if(mInstance4 == null)
mInstance4 = new Singleton_variable();
return mInstance4;
}
public void setSingleton_name(String newname) {
this.name_user = newname;
}
public String getSingleton_name() {
return name_user;
}
private static Singleton_variable mInstance5;
// other instance variables can be here
private String museum = "null";
public static Singleton_variable getmInstance5() {
if(mInstance5 == null)
mInstance5 = new Singleton_variable();
return mInstance5;
}
public void setSingleton_museum(String newmuseum) {
this.museum = newmuseum;
}
public String getSingleton_museum() {
return museum;
}
private static Singleton_variable mInstance6;
// other instance variables can be here
private int total_sum;
public static Singleton_variable getmInstance6() {
if(mInstance6 == null)
mInstance6 = new Singleton_variable();
return mInstance6;
}
public void setSingleton_total_sum(int newsum) {
this.total_sum = newsum;
}
public int getSingleton_total_sum() {
return total_sum;
}
}
package com.example.museum2;
import android.app.LoaderManager;
import android.content.ContentValues;
import android.content.CursorLoader;
import android.content.Intent;
import android.content.Loader;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class Snowglobe extends AppCompatActivity implements LoaderManager.LoaderCallbacks<Cursor> {
ImageView imageView;
ImageButton plusquantity, minusquantity;
TextView quantitynumber, drinnkName, coffeePrice;
Button addtoCart;
int quantity;
public Uri mCurrentCartUri;
boolean hasAllRequiredValues = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_snowglobe);
imageView = findViewById(R.id.imageViewInfo);
plusquantity = findViewById(R.id.addquantity);
minusquantity = findViewById(R.id.subquantity);
quantitynumber = findViewById(R.id.quantity);
drinnkName = findViewById(R.id.drinkNameinInfo);
coffeePrice = findViewById(R.id.coffeePrice);
addtoCart = findViewById(R.id.addtocart);
// setting the name of drink
drinnkName.setText("Snowglobe");
addtoCart.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Snowglobe.this, SummaryActivity.class);
String price_test = coffeePrice.getText().toString();
intent.putExtra("price_test", price_test);
Singleton_variable.getInstance().setSingleton("no museum");
startActivity(intent);
// once this button is clicked we want to save our values in the database and send those values
// right away to summary activity where we display the order info
SaveCart();
}
});
plusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// coffee price
int basePrice = 5;
quantity++;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
});
minusquantity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int basePrice = 5;
// because we dont want the quantity go less than 0
if (quantity == 0) {
Toast.makeText(Snowglobe.this, "Cant decrease quantity < 0", Toast.LENGTH_SHORT).show();
} else {
quantity--;
displayQuantity();
int coffePrice = basePrice * quantity;
String setnewPrice = String.valueOf(coffePrice);
coffeePrice.setText(setnewPrice);
}
}
});
}
private boolean SaveCart() {
// getting the values from our views
String name = drinnkName.getText().toString();
String price = coffeePrice.getText().toString();
String quantity = quantitynumber.getText().toString();
ContentValues values = new ContentValues();
values.put(OrderContract.OrderEntry.COLUMN_NAME, name);
values.put(OrderContract.OrderEntry.COLUMN_PRICE, price);
values.put(OrderContract.OrderEntry.COLUMN_QUANTITY, quantity);
if (mCurrentCartUri == null) {
Uri newUri = getContentResolver().insert(OrderContract.OrderEntry.CONTENT_URI, values);
if (newUri==null) {
Toast.makeText(this, "Failed to add to Cart", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, "Success adding to Cart", Toast.LENGTH_SHORT).show();
}
}
hasAllRequiredValues = true;
return hasAllRequiredValues;
}
private void displayQuantity() {
quantitynumber.setText(String.valueOf(quantity));
}
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
String[] projection = {OrderContract.OrderEntry._ID,
OrderContract.OrderEntry.COLUMN_NAME,
OrderContract.OrderEntry.COLUMN_PRICE,
OrderContract.OrderEntry.COLUMN_QUANTITY,
};
return new CursorLoader(this, mCurrentCartUri,
projection,
null,
null,
null);
}
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
if (cursor == null || cursor.getCount() < 1) {
return;
}
if (cursor.moveToFirst()) {
int name = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_NAME);
int price = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_PRICE);
int quantity = cursor.getColumnIndex(OrderContract.OrderEntry.COLUMN_QUANTITY);
String nameofdrink = cursor.getString(name);
String priceofdrink = cursor.getString(price);
String quantityofdrink = cursor.getString(quantity);
drinnkName.setText(nameofdrink);
coffeePrice.setText(priceofdrink);
quantitynumber.setText(quantityofdrink);
}
}
@Override
public void onLoaderReset(Loader<Cursor> loader) {
drinnkName.setText("");
coffeePrice.setText("");
quantitynumber.setText("");
}
}
\ No newline at end of file
package com.example.museum2;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
import java.util.List;
public class Souvenir extends AppCompatActivity {
List<Model> modelList;
RecyclerView recyclerView;
OrderAdapter2 mAdapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_souvenir);
// creating an arraylist
modelList = new ArrayList<>();
modelList.add(new Model("Shirt", getString(R.string.shirt), R.drawable.shirt ));
modelList.add(new Model("Hat", getString(R.string.hat), R.drawable.hat));
modelList.add(new Model("Snow globe", getString(R.string.snow_globe), R.drawable.snow_globe));
modelList.add(new Model("Key chain", getString(R.string.key_chain), R.drawable.key_chain));
modelList.add(new Model("Bottle", getString(R.string.bottle), R.drawable.bottle));
modelList.add(new Model("Mug", getString(R.string.mug), R.drawable.mug));
modelList.add(new Model("Coaster", getString(R.string.coaster), R.drawable.coaster));
// recyclerview
recyclerView = findViewById(R.id.recyclerView);
recyclerView.setLayoutManager(new LinearLayoutManager(null));
// adapter
mAdapter = new OrderAdapter2(this, modelList);
recyclerView.setAdapter(mAdapter);
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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