├── .gitignore
├── .idea
├── .gitignore
├── .name
├── compiler.xml
├── gradle.xml
├── inspectionProfiles
│ └── Project_Default.xml
├── jarRepositories.xml
├── misc.xml
└── vcs.xml
├── README.md
├── app
├── .gitignore
├── build.gradle
├── google-services.json
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── example
│ │ └── clitz_arestaurantapp
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── clitz_arestaurantapp
│ │ │ ├── Adapter
│ │ │ ├── MyCartAdapter.java
│ │ │ └── MyDrinkAdapter.java
│ │ │ ├── AutoImageSlider.java
│ │ │ ├── CartActivity.java
│ │ │ ├── DeliveryFragment.java
│ │ │ ├── DineInOrderPlaced.java
│ │ │ ├── HDPage1Fragment.java
│ │ │ ├── HDPage2Fragment.java
│ │ │ ├── HDPage3Fragment.java
│ │ │ ├── HDPage4Fragment.java
│ │ │ ├── HDPage5Fragment.java
│ │ │ ├── HomeDeliveryLiquidSwipe.java
│ │ │ ├── Listener
│ │ │ ├── ICartLoadListener.java
│ │ │ ├── IDrinkLoadListener.java
│ │ │ └── IRecyclerViewClickListener.java
│ │ │ ├── LoginAdapter.java
│ │ │ ├── MainActivity.java
│ │ │ ├── MenuList.java
│ │ │ ├── Model
│ │ │ ├── CartModel.java
│ │ │ ├── CustomerDetails.java
│ │ │ ├── DrinkModel.java
│ │ │ └── User.java
│ │ │ ├── PlaceYourOrder.java
│ │ │ ├── QrCodeFragment.java
│ │ │ ├── SliderAdapter.java
│ │ │ ├── Splashscreen.java
│ │ │ ├── Utils
│ │ │ └── SpaceItemDecoration.java
│ │ │ ├── eventBus
│ │ │ └── myUpdateCartEvent.java
│ │ │ ├── login_tab.java
│ │ │ ├── sign_up_tab.java
│ │ │ └── xyz.java
│ └── res
│ │ ├── drawable-v24
│ │ ├── ic_baseline_login_order.xml
│ │ ├── ic_launcher_foreground.xml
│ │ ├── product.png
│ │ ├── radio_normal.xml
│ │ ├── radio_selected.xml
│ │ ├── radio_selector.xml
│ │ └── text_color.xml
│ │ ├── drawable
│ │ ├── auto_image_slider_1.jpg
│ │ ├── auto_image_slider_10.jpg
│ │ ├── auto_image_slider_11.jpg
│ │ ├── auto_image_slider_4.jpg
│ │ ├── auto_image_slider_5.jpg
│ │ ├── auto_image_slider_8.jpg
│ │ ├── capture_logo.PNG
│ │ ├── clitz_logo.png
│ │ ├── clitz_logo_1.png
│ │ ├── edit_text_box_border.xml
│ │ ├── gif22.gif
│ │ ├── gif_order_placed.gif
│ │ ├── giphy.gif
│ │ ├── home_delivery_btn.xml
│ │ ├── ic_baseline_add_box_24.xml
│ │ ├── ic_baseline_arrow_back_ios_new_24.xml
│ │ ├── ic_baseline_arrow_forward_24.xml
│ │ ├── ic_baseline_chevron_right_24.xml
│ │ ├── ic_baseline_clear_24.xml
│ │ ├── ic_baseline_indeterminate_check_box_24.xml
│ │ ├── ic_baseline_lock_open_24.xml
│ │ ├── ic_baseline_login_24.xml
│ │ ├── ic_baseline_mail_outline_24.xml
│ │ ├── ic_baseline_navigate_next_24.xml
│ │ ├── ic_baseline_person_24.xml
│ │ ├── ic_baseline_phone_24.xml
│ │ ├── ic_baseline_shopping_cart_24.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── ic_launcher_foreground.xml
│ │ ├── imagebehindlogo.jpg
│ │ ├── img1.png
│ │ ├── img2.png
│ │ ├── img3.png
│ │ ├── img4.png
│ │ ├── img5.png
│ │ ├── logo.png
│ │ ├── notification.png
│ │ ├── sign_in_button_border.xml
│ │ ├── unsplash1.jpg
│ │ └── view_bg.xml
│ │ ├── layout
│ │ ├── activity_auto_image_slider.xml
│ │ ├── activity_cart.xml
│ │ ├── activity_dine_in_order_placed.xml
│ │ ├── activity_home_delivery_liquid_swipe.xml
│ │ ├── activity_main.xml
│ │ ├── activity_menu_list.xml
│ │ ├── activity_place_your_order.xml
│ │ ├── activity_splashscreen.xml
│ │ ├── activity_xyz.xml
│ │ ├── fragment_delivery.xml
│ │ ├── fragment_hd_page1.xml
│ │ ├── fragment_hd_page2.xml
│ │ ├── fragment_hd_page3.xml
│ │ ├── fragment_hd_page4.xml
│ │ ├── fragment_hd_page5.xml
│ │ ├── fragment_login_tab.xml
│ │ ├── fragment_qr_code.xml
│ │ ├── fragment_sign_up_tab.xml
│ │ ├── layout_cart_item.xml
│ │ ├── layout_drink_item.xml
│ │ └── slider_images.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── values-night
│ │ └── themes.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── refs.xml
│ │ ├── strings.xml
│ │ └── themes.xml
│ └── test
│ └── java
│ └── com
│ └── example
│ └── clitz_arestaurantapp
│ └── ExampleUnitTest.java
├── build.gradle
├── github.properties
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 | local.properties
16 |
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | Clitz - A Restaurant App
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
19 |
20 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/jarRepositories.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Food_Delivery_Android_App_AndroidStudio_Firebase
2 | This android application is a food delivery application.
3 | It uses Firebase Realtime database and made with the use of android java.
4 | This app is having functionality like register user,sign in, different types of Notification,Order Food from app and you can you want dine in or you want at home,also we have use google map ,Qr code scanner to make order from hotel and etc.
5 |
6 |
7 | if u want to see Demo video or screen shot of food order app click on this link below:
8 | https://www.linkedin.com/posts/nihar-zatakiya-745aa0193_android-androiddevelopment-foodapp-activity-6884404929134374912-lYc1
9 |
10 |
11 | 
12 |
13 | 
14 | 
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | id 'com.google.gms.google-services'
4 | }
5 |
6 | android {
7 | compileSdkVersion 31
8 | buildToolsVersion '32.0.0'
9 |
10 | defaultConfig {
11 | applicationId "com.example.clitz_arestaurantapp"
12 | minSdkVersion 24
13 | targetSdkVersion 30
14 | versionCode 1
15 | versionName "1.0"
16 | vectorDrawables.useSupportLibrary = true
17 |
18 |
19 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
20 | }
21 | buildTypes {
22 | release {
23 | minifyEnabled false
24 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
25 | }
26 | }
27 | compileOptions {
28 | sourceCompatibility JavaVersion.VERSION_1_8
29 | targetCompatibility JavaVersion.VERSION_1_8
30 | }
31 | }
32 |
33 | dependencies {
34 |
35 | implementation fileTree(dir: "libs", include: ["*.jar"])
36 | implementation 'com.github.blikoon:QRCodeScanner:0.1.2'
37 | implementation 'com.google.firebase:firebase-analytics:20.0.2'
38 | implementation 'com.google.firebase:firebase-auth:21.0.1'
39 | implementation 'com.google.firebase:firebase-database:20.0.3'
40 | implementation 'com.google.firebase:firebase-storage:20.0.0'
41 | implementation 'com.google.firebase:firebase-messaging:23.0.0'
42 | implementation 'com.google.firebase:firebase-firestore:24.0.0'
43 | implementation 'androidx.legacy:legacy-support-v4:1.0.0'
44 | ext.kotlin_version = '1.4.10'
45 |
46 | implementation 'androidx.appcompat:appcompat:1.4.0'
47 | implementation 'com.google.android.material:material:1.4.0'
48 | implementation 'com.google.android.material:material:1.4.0'
49 | implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
50 | implementation 'com.github.smarteist:autoimageslider:1.3.9'
51 | testImplementation 'junit:junit:4.13.2'
52 | androidTestImplementation 'androidx.test.ext:junit:1.1.3'
53 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
54 | implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.23'
55 |
56 | // Cuberto Liquid Swiper
57 | implementation 'com.cuberto:liquid-swipe:1.0.0'
58 | //noinspection GradleCompatible
59 | implementation 'com.android.support:design:29.0.0'
60 | implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.6.10'
61 | implementation 'androidx.core:core:1.7.0'
62 | implementation 'androidx.core:core-ktx:1.7.0'
63 |
64 |
65 | implementation 'androidx.core:core-ktx:1.7.0'
66 | implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.6.10'
67 |
68 | //Butter Knife
69 | implementation 'com.jakewharton:butterknife:10.2.3'
70 | annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'
71 |
72 | //Glide
73 | implementation 'com.github.bumptech.glide:glide:4.12.0'
74 | annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
75 |
76 | //Notification Badge
77 | implementation 'com.nex3z:notification-badge:1.0.5'
78 |
79 | //EventBus
80 | implementation 'org.greenrobot:eventbus:3.3.1'
81 | }
--------------------------------------------------------------------------------
/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "470418525436",
4 | "project_id": "clitz---a-restaurant-app",
5 | "storage_bucket": "clitz---a-restaurant-app.appspot.com"
6 | },
7 | "client": [
8 | {
9 | "client_info": {
10 | "mobilesdk_app_id": "1:470418525436:android:90f9bda3308ca707281b79",
11 | "android_client_info": {
12 | "package_name": "com.example.clitz_arestaurantapp"
13 | }
14 | },
15 | "oauth_client": [
16 | {
17 | "client_id": "470418525436-0naa1e6sn34dftb4nplf96iidmli5mvf.apps.googleusercontent.com",
18 | "client_type": 3
19 | }
20 | ],
21 | "api_key": [
22 | {
23 | "current_key": "AIzaSyALpjz4_uk-fQEOehqtKmphGZNVD3inf3I"
24 | }
25 | ],
26 | "services": {
27 | "appinvite_service": {
28 | "other_platform_oauth_client": [
29 | {
30 | "client_id": "470418525436-0naa1e6sn34dftb4nplf96iidmli5mvf.apps.googleusercontent.com",
31 | "client_type": 3
32 | }
33 | ]
34 | }
35 | }
36 | }
37 | ],
38 | "configuration_version": "1"
39 | }
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/example/clitz_arestaurantapp/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 | assertEquals("com.example.clitz_arestaurantapp", appContext.getPackageName());
25 | }
26 | }
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
17 |
20 |
23 |
26 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/Adapter/MyCartAdapter.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp.Adapter;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.app.AlertDialog;
5 | import android.content.Context;
6 | import android.content.DialogInterface;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 | import android.widget.ImageView;
11 | import android.widget.TextView;
12 |
13 | import androidx.annotation.NonNull;
14 | import androidx.recyclerview.widget.RecyclerView;
15 |
16 | import com.bumptech.glide.Glide;
17 | import com.example.clitz_arestaurantapp.Model.CartModel;
18 | import com.example.clitz_arestaurantapp.R;
19 | import com.example.clitz_arestaurantapp.eventBus.myUpdateCartEvent;
20 | import com.google.firebase.database.FirebaseDatabase;
21 |
22 | import org.greenrobot.eventbus.EventBus;
23 |
24 | import java.util.List;
25 |
26 | import butterknife.BindView;
27 | import butterknife.ButterKnife;
28 | import butterknife.Unbinder;
29 |
30 | public class MyCartAdapter extends RecyclerView.Adapter {
31 |
32 | private Context context;
33 | private List cartModelList;
34 |
35 | public MyCartAdapter(Context context, List cartModelList) {
36 | this.context = context;
37 | this.cartModelList = cartModelList;
38 | }
39 |
40 | @NonNull
41 | @Override
42 | public MyCartViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
43 | return new MyCartViewHolder(LayoutInflater.from(context)
44 | .inflate(R.layout.layout_cart_item,parent,false));
45 | }
46 |
47 | @Override
48 | public void onBindViewHolder(@NonNull MyCartViewHolder holder, @SuppressLint("RecyclerView") int position) {
49 | Glide.with(context)
50 | .load(cartModelList.get(position).getImage())
51 | .into(holder.imageView);
52 |
53 | holder.txtPrice.setText(new StringBuilder("$").append(cartModelList.get(position).getPrice()));
54 | holder.txtName.setText(new StringBuilder().append(cartModelList.get(position).getName()));
55 | holder.txtQuantity.setText(new StringBuilder().append( cartModelList.get(position).getQuantity()));
56 |
57 | //Event
58 | holder.btnMinus.setOnClickListener(v -> {
59 | minusCartItem(holder, cartModelList.get(position));
60 | });
61 |
62 | holder.btnPlus.setOnClickListener(v -> {
63 | plusCartItem(holder, cartModelList.get(position));
64 | });
65 |
66 | holder.btnDelete.setOnClickListener(v -> {
67 | AlertDialog dialog = new AlertDialog.Builder(context)
68 | .setTitle("Delete Item ")
69 | .setMessage("Are you sure you want to delete ?")
70 | .setNegativeButton("CANCEL", new DialogInterface.OnClickListener() {
71 | @Override
72 | public void onClick(DialogInterface dialog, int which) {
73 | dialog.dismiss();
74 | }
75 | })
76 | .setPositiveButton("OK", new DialogInterface.OnClickListener() {
77 | @Override
78 | public void onClick(DialogInterface dialog, int which) {
79 |
80 | //Temporary delete/remove
81 | notifyItemRemoved(position);
82 |
83 | deleteFromFirebase(cartModelList.get(position));
84 | dialog.dismiss();
85 | }
86 | }).create();
87 | dialog.show();
88 | });
89 | }
90 |
91 | private void deleteFromFirebase(CartModel cartModel) {
92 | FirebaseDatabase.getInstance()
93 | .getReference("Cart")
94 | .child("UNIQUE_USER_ID")
95 | .child(cartModel.getKey())
96 | .removeValue()
97 | .addOnSuccessListener(aVoid -> EventBus.getDefault().postSticky(new myUpdateCartEvent()));
98 | }
99 |
100 | private void plusCartItem(MyCartViewHolder holder, CartModel cartModel) {
101 | cartModel.setQuantity(cartModel.getQuantity()+1);
102 | cartModel.setTotalPrice(cartModel.getQuantity()*Float.parseFloat(cartModel.getPrice()));
103 |
104 | // Update Quantity
105 | holder.txtQuantity.setText(new StringBuilder().append(cartModel.getQuantity()));
106 | updateFirebase(cartModel);
107 | }
108 |
109 | private void minusCartItem(MyCartViewHolder holder, CartModel cartModel) {
110 | if (cartModel.getQuantity() > 1)
111 | {
112 | cartModel.setQuantity(cartModel.getQuantity()-1);
113 | cartModel.setTotalPrice(cartModel.getQuantity()*Float.parseFloat(cartModel.getPrice()));
114 |
115 | // Update Quantity
116 | holder.txtQuantity.setText(new StringBuilder().append(cartModel.getQuantity()));
117 | updateFirebase(cartModel);
118 | }
119 | }
120 |
121 | private void updateFirebase(CartModel cartModel) {
122 | FirebaseDatabase.getInstance()
123 | .getReference("Cart")
124 | .child("UNIQUE_USER_ID")
125 | .child(cartModel.getKey())
126 | .setValue(cartModel)
127 | .addOnSuccessListener(aVoid -> EventBus.getDefault().postSticky(new myUpdateCartEvent()));
128 | }
129 |
130 | @Override
131 | public int getItemCount() {
132 | return cartModelList.size();
133 | }
134 |
135 | public class MyCartViewHolder extends RecyclerView.ViewHolder{
136 |
137 | @BindView(R.id.btnMinus)
138 | ImageView btnMinus;
139 | @BindView(R.id.btnPlus)
140 | ImageView btnPlus;
141 | @BindView(R.id.btnDelete)
142 | ImageView btnDelete;
143 | @BindView(R.id.imageView)
144 | ImageView imageView;
145 | @BindView(R.id.txtName)
146 | TextView txtName;
147 | @BindView(R.id.txtPrice)
148 | TextView txtPrice;
149 | @BindView(R.id.txtQuantity)
150 | TextView txtQuantity;
151 |
152 | Unbinder unbinder;
153 |
154 | public MyCartViewHolder(@NonNull View itemView) {
155 | super(itemView);
156 | unbinder = ButterKnife.bind(this,itemView);
157 | }
158 | }
159 | }
160 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/Adapter/MyDrinkAdapter.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp.Adapter;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.ImageView;
8 | import android.widget.TextView;
9 |
10 | import androidx.annotation.NonNull;
11 | import androidx.recyclerview.widget.RecyclerView;
12 |
13 | import com.bumptech.glide.Glide;
14 | import com.example.clitz_arestaurantapp.Listener.ICartLoadListener;
15 | import com.example.clitz_arestaurantapp.Listener.IRecyclerViewClickListener;
16 | import com.example.clitz_arestaurantapp.Model.CartModel;
17 | import com.example.clitz_arestaurantapp.Model.DrinkModel;
18 | import com.example.clitz_arestaurantapp.R;
19 | import com.example.clitz_arestaurantapp.eventBus.myUpdateCartEvent;
20 | import com.google.firebase.database.DataSnapshot;
21 | import com.google.firebase.database.DatabaseError;
22 | import com.google.firebase.database.DatabaseReference;
23 | import com.google.firebase.database.FirebaseDatabase;
24 | import com.google.firebase.database.ValueEventListener;
25 |
26 | import org.greenrobot.eventbus.EventBus;
27 |
28 | import java.util.HashMap;
29 | import java.util.List;
30 | import java.util.Map;
31 |
32 | import butterknife.BindView;
33 | import butterknife.ButterKnife;
34 | import butterknife.Unbinder;
35 |
36 | public class MyDrinkAdapter extends RecyclerView.Adapter {
37 |
38 | private Context context;
39 | private List drinkModelList;
40 | private ICartLoadListener iCartLoadListener;
41 |
42 |
43 | public MyDrinkAdapter(Context context, List drinkModelList, ICartLoadListener iCartLoadListener) {
44 | this.context = context;
45 | this.drinkModelList = drinkModelList;
46 | this.iCartLoadListener = iCartLoadListener;
47 | }
48 |
49 |
50 | @NonNull
51 | @Override
52 | public MyDrinkViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
53 | return new MyDrinkViewHolder(LayoutInflater.from(context)
54 | .inflate(R.layout.layout_drink_item,parent,false));
55 | }
56 |
57 | @Override
58 | public void onBindViewHolder(@NonNull MyDrinkViewHolder holder, int position) {
59 | Glide.with(context)
60 | .load(drinkModelList.get(position).getImage())
61 | .into(holder.imageView);
62 |
63 | holder.txtPrice.setText(new StringBuilder("$").append(drinkModelList.get(position).getPrice()));
64 | holder.txtName.setText(new StringBuilder().append(drinkModelList.get(position).getName()));
65 |
66 | holder.setListener((view,adapterPosition) -> {
67 | addTocart(drinkModelList.get(position));
68 | });
69 |
70 | }
71 |
72 | private void addTocart(DrinkModel drinkModel) {
73 | DatabaseReference userCart = FirebaseDatabase
74 | .getInstance()
75 | .getReference("Cart")
76 | .child("UNIQUE_USER_ID");
77 |
78 | userCart.child(drinkModel.getKey()).addListenerForSingleValueEvent(new ValueEventListener() {
79 | @Override
80 | public void onDataChange(@NonNull DataSnapshot snapshot) {
81 |
82 | if(snapshot.exists()){
83 |
84 | CartModel cartModel = snapshot.getValue(CartModel.class);
85 | cartModel.setQuantity(cartModel.getQuantity()+1);
86 | Map updateData = new HashMap<>();
87 | updateData.put("quantity",cartModel.getQuantity());
88 | updateData.put("totalPrice",cartModel.getQuantity()*Float.parseFloat((cartModel.getPrice())));
89 |
90 | userCart.child(drinkModel.getKey())
91 | .updateChildren(updateData)
92 | .addOnSuccessListener(aVoid -> {
93 | iCartLoadListener.onCartLoadFailed("Add to cart Success");
94 | })
95 | .addOnFailureListener(e -> iCartLoadListener.onCartLoadFailed(e.getMessage()));
96 |
97 | }
98 | else {
99 |
100 | CartModel cartModel = new CartModel();
101 | cartModel.setName(drinkModel.getName());
102 | cartModel.setImage(drinkModel.getImage());
103 | cartModel.setKey(drinkModel.getKey());
104 | cartModel.setPrice(drinkModel.getPrice());
105 | cartModel.setQuantity(1);
106 | cartModel.setTotalPrice(Float.parseFloat(drinkModel.getPrice()));
107 |
108 | userCart.child(drinkModel.getKey())
109 | .setValue(cartModel)
110 | .addOnSuccessListener(aVoid -> {
111 | iCartLoadListener.onCartLoadFailed("Add to cart Success");
112 | })
113 | .addOnFailureListener(e -> iCartLoadListener.onCartLoadFailed(e.getMessage()));
114 |
115 | }
116 | EventBus.getDefault().postSticky(new myUpdateCartEvent());
117 | }
118 |
119 | @Override
120 | public void onCancelled(@NonNull DatabaseError error) {
121 | iCartLoadListener.onCartLoadFailed(error.getMessage());
122 | }
123 | });
124 | }
125 |
126 | @Override
127 | public int getItemCount() {
128 | return drinkModelList.size();
129 | }
130 |
131 | public class MyDrinkViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
132 |
133 | @BindView(R.id.imageView)
134 | ImageView imageView;
135 | @BindView(R.id.txtPrice)
136 | TextView txtPrice;
137 | @BindView(R.id.txtName)
138 | TextView txtName;
139 |
140 | IRecyclerViewClickListener listener;
141 |
142 | public void setListener(IRecyclerViewClickListener listener) {
143 | this.listener = listener;
144 | }
145 |
146 | private Unbinder unbinder;
147 |
148 | public MyDrinkViewHolder(@NonNull View itemView) {
149 | super(itemView);
150 | unbinder = ButterKnife.bind(this,itemView);
151 | itemView.setOnClickListener(this);
152 | }
153 |
154 | @Override
155 | public void onClick(View v) {
156 | listener.onRecycleerClick(v,getAdapterPosition());
157 | }
158 | }
159 | }
160 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/AutoImageSlider.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.view.View;
6 | import android.widget.Button;
7 | import android.widget.Toast;
8 |
9 | import androidx.appcompat.app.AppCompatActivity;
10 |
11 | import com.smarteist.autoimageslider.SliderView;
12 |
13 | public class AutoImageSlider extends AppCompatActivity {
14 |
15 | Button dbutton;
16 | SliderView sv;
17 | int[] images = {R.drawable.auto_image_slider_1,
18 | R.drawable.auto_image_slider_11,
19 | R.drawable.auto_image_slider_8,
20 | R.drawable.auto_image_slider_10,
21 | R.drawable.auto_image_slider_5,
22 | R.drawable.auto_image_slider_4,
23 | };
24 |
25 | @Override
26 | protected void onCreate(Bundle savedInstanceState) {
27 | super.onCreate(savedInstanceState);
28 | setContentView(R.layout.activity_auto_image_slider);
29 | // getSupportActionBar().hide();
30 |
31 | sv = findViewById(R.id.image_slider);
32 |
33 | // Auto Image Slider...
34 | SliderAdapter sliderAdapter = new SliderAdapter(images);
35 | sv.setSliderAdapter(sliderAdapter);
36 | sv.startAutoCycle();
37 |
38 | // Home Delivery Button...
39 | dbutton = findViewById(R.id.homeDeliveryButton);
40 | dbutton.setOnClickListener(new View.OnClickListener() {
41 | @Override
42 | public void onClick(View v) {
43 | Toast.makeText(getApplicationContext(), "Success!!!", Toast.LENGTH_SHORT).show();
44 | Intent i = new Intent(getApplicationContext(),MenuList.class);
45 | startActivity(i);
46 | finish();
47 | }
48 | });
49 | }
50 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/CartActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.view.View;
6 | import android.widget.ImageView;
7 | import android.widget.RelativeLayout;
8 | import android.widget.TextView;
9 |
10 | import androidx.annotation.NonNull;
11 | import androidx.appcompat.app.AppCompatActivity;
12 | import androidx.recyclerview.widget.DividerItemDecoration;
13 | import androidx.recyclerview.widget.LinearLayoutManager;
14 | import androidx.recyclerview.widget.RecyclerView;
15 |
16 | import com.example.clitz_arestaurantapp.Adapter.MyCartAdapter;
17 | import com.example.clitz_arestaurantapp.Listener.ICartLoadListener;
18 | import com.example.clitz_arestaurantapp.Model.CartModel;
19 | import com.example.clitz_arestaurantapp.Model.DrinkModel;
20 | import com.example.clitz_arestaurantapp.eventBus.myUpdateCartEvent;
21 | import com.google.android.material.snackbar.Snackbar;
22 | import com.google.firebase.database.DataSnapshot;
23 | import com.google.firebase.database.DatabaseError;
24 | import com.google.firebase.database.FirebaseDatabase;
25 | import com.google.firebase.database.ValueEventListener;
26 |
27 | import org.greenrobot.eventbus.EventBus;
28 | import org.greenrobot.eventbus.Subscribe;
29 | import org.greenrobot.eventbus.ThreadMode;
30 |
31 | import java.util.ArrayList;
32 | import java.util.List;
33 |
34 | import butterknife.BindView;
35 | import butterknife.ButterKnife;
36 |
37 | public class CartActivity extends AppCompatActivity implements ICartLoadListener {
38 |
39 | @BindView(R.id.recycler_cart)
40 | RecyclerView recyclerCart;
41 | @BindView(R.id.mainLayout)
42 | RelativeLayout mainLayout;
43 | @BindView(R.id.txtTotal)
44 | TextView txtTotal;
45 | @BindView(R.id.btnBack)
46 | ImageView btnBack;
47 | @BindView(R.id.goToPlaceOrder)
48 | ImageView goToPlaceOrder;
49 |
50 | ICartLoadListener cartLoadListener;
51 |
52 | @Override
53 | protected void onStart() {
54 | super.onStart();
55 | EventBus.getDefault().register(this);
56 | }
57 |
58 | @Override
59 | protected void onStop() {
60 | if (EventBus.getDefault().hasSubscriberForEvent(myUpdateCartEvent.class))
61 | {
62 | EventBus.getDefault().removeStickyEvent(myUpdateCartEvent.class);
63 | }
64 | EventBus.getDefault().unregister(this);
65 | super.onStop();
66 | }
67 |
68 | @Subscribe(threadMode = ThreadMode.MAIN, sticky = true)
69 | public void onUpdateCart(myUpdateCartEvent event)
70 | {
71 | loadCartFromFirebase();
72 | }
73 |
74 |
75 | @Override
76 | protected void onCreate(Bundle savedInstanceState) {
77 | super.onCreate(savedInstanceState);
78 | setContentView(R.layout.activity_cart);
79 | //getSupportActionBar().hide();
80 |
81 | init();
82 | loadCartFromFirebase();
83 |
84 | goToPlaceOrder.setOnClickListener(new View.OnClickListener() {
85 | @Override
86 | public void onClick(View v) {
87 | Intent i = new Intent(getApplicationContext(), PlaceYourOrder.class);
88 | startActivity(i);
89 | }
90 | });
91 | }
92 |
93 | private void loadCartFromFirebase() {
94 | List cartModels = new ArrayList<>();
95 |
96 | FirebaseDatabase.getInstance()
97 | .getReference("Cart")
98 | .child("UNIQUE_USER_ID")
99 | .addListenerForSingleValueEvent(new ValueEventListener() {
100 | @Override
101 | public void onDataChange(@NonNull DataSnapshot snapshot) {
102 | if (snapshot.exists())
103 | {
104 | for (DataSnapshot cartSnapshot: snapshot.getChildren())
105 | {
106 | CartModel cartModel = cartSnapshot.getValue(CartModel.class);
107 | cartModel.setKey(cartSnapshot.getKey());
108 | cartModels.add(cartModel);
109 | }
110 | cartLoadListener.onCartLoadSuccess(cartModels);
111 | }
112 | else
113 | {
114 | cartLoadListener.onCartLoadFailed("Cart Empty");
115 | }
116 | }
117 |
118 | @Override
119 | public void onCancelled(@NonNull DatabaseError error) {
120 | cartLoadListener.onCartLoadFailed(error.getMessage());
121 | }
122 | });
123 | }
124 |
125 | private void init()
126 | {
127 | ButterKnife.bind(this);
128 |
129 | cartLoadListener = this;
130 | LinearLayoutManager layoutManager = new LinearLayoutManager(this);
131 | recyclerCart.setLayoutManager(layoutManager);
132 | recyclerCart.addItemDecoration(new DividerItemDecoration(this,layoutManager.getOrientation()));
133 |
134 | btnBack.setOnClickListener(v -> finish());
135 | }
136 |
137 | @Override
138 | public void onDrinkLoadSuccess(List drinkModelList) {
139 |
140 | }
141 |
142 | @Override
143 | public void onDrinkLoadFailed(String message) {
144 |
145 | }
146 |
147 | @Override
148 | public void onCartLoadSuccess(List cartModelList) {
149 | double sum = 0;
150 | for (CartModel cartModel : cartModelList)
151 | {
152 | sum += cartModel.getTotalPrice();
153 | }
154 | txtTotal.setText(new StringBuilder("Total : $ ").append(sum));
155 | MyCartAdapter adapter = new MyCartAdapter(this, cartModelList);
156 | recyclerCart.setAdapter(adapter);
157 |
158 | }
159 |
160 | @Override
161 | public void onCartLoadFailed(String message) {
162 | Snackbar.make(mainLayout, message,Snackbar.LENGTH_LONG).show();
163 | }
164 |
165 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/DeliveryFragment.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import android.app.NotificationChannel;
4 | import android.app.NotificationManager;
5 | import android.app.ProgressDialog;
6 | import android.content.ActivityNotFoundException;
7 | import android.content.Intent;
8 | import android.net.Uri;
9 | import android.os.Build;
10 | import android.os.Bundle;
11 | import android.view.LayoutInflater;
12 | import android.view.View;
13 | import android.view.ViewGroup;
14 | import android.widget.Button;
15 | import android.widget.EditText;
16 | import android.widget.Toast;
17 |
18 | import androidx.core.app.NotificationCompat;
19 | import androidx.core.app.NotificationManagerCompat;
20 | import androidx.fragment.app.Fragment;
21 |
22 | import com.example.clitz_arestaurantapp.Model.CustomerDetails;
23 | import com.google.firebase.database.DataSnapshot;
24 | import com.google.firebase.database.DatabaseError;
25 | import com.google.firebase.database.DatabaseReference;
26 | import com.google.firebase.database.FirebaseDatabase;
27 | import com.google.firebase.database.ValueEventListener;
28 |
29 |
30 | public class DeliveryFragment extends Fragment {
31 |
32 | private final String esource="Sopan Heights Rajkot";
33 |
34 | EditText Name,Number, Address, City,State,Pincode;
35 | Button btnorder;
36 |
37 | @Override
38 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
39 | ViewGroup v = (ViewGroup) inflater.inflate(R.layout.fragment_delivery, container, false);
40 |
41 | Name = v.findViewById(R.id.yourName);
42 | Number = v.findViewById(R.id.yourNumber);
43 | Address = v.findViewById(R.id.yourAddress);
44 | City = v.findViewById(R.id.yourCity);
45 | State = v.findViewById(R.id.yourState);
46 | Pincode = v.findViewById(R.id.yourPincode);
47 | btnorder = v.findViewById(R.id.placeOrderButton);
48 |
49 | final FirebaseDatabase database = FirebaseDatabase.getInstance();
50 | final DatabaseReference table_user = database.getReference("Customer Details");
51 |
52 | btnorder.setOnClickListener(new View.OnClickListener() {
53 | @Override
54 | public void onClick(View v) {
55 |
56 | if (Name.getText().toString().equals("") || Number.getText().toString().equals("") || Address.getText().toString().equals("") || City.getText().toString().equals("") || State.getText().toString().equals("") || Pincode.getText().toString().equals("")) {
57 | Toast.makeText(getContext(), "Please enter details correctly", Toast.LENGTH_SHORT).show();
58 | }
59 | else {
60 | final ProgressDialog mDialog = new ProgressDialog(getContext());
61 | mDialog.setMessage("Please wait...");
62 | mDialog.show();
63 |
64 | table_user.addValueEventListener(new ValueEventListener() {
65 | @Override
66 | public void onDataChange(DataSnapshot dataSnapshot) {
67 |
68 | mDialog.dismiss();
69 | CustomerDetails customerDetails = new CustomerDetails(Name.getText().toString(), Number.getText().toString(), Address.getText().toString(), City.getText().toString(), State.getText().toString(), Pincode.getText().toString());
70 | table_user.child(Number.getText().toString()).setValue(customerDetails);
71 | //Toast.makeText(getContext(), "Place Order Successfully", Toast.LENGTH_SHORT).show();
72 |
73 | String sdest = Address.getText().toString().trim();
74 |
75 | if(sdest.equals(""))
76 | {
77 | Toast.makeText(getContext(),"Enter Destination",Toast.LENGTH_SHORT).show();
78 | }
79 | else
80 | {
81 | displaytrack(esource,sdest);
82 | }
83 |
84 | notification();
85 |
86 | }
87 |
88 | @Override
89 | public void onCancelled(DatabaseError databaseError) {
90 |
91 | }
92 | });
93 | }
94 | }
95 | });
96 |
97 | return v;
98 | }
99 |
100 | private void displaytrack(String source,String dest) {
101 | try {
102 | Uri uri = Uri.parse("https://www.google.co.in/maps/dir/" + source + "/" + dest);
103 | Intent intent = new Intent(Intent.ACTION_VIEW, uri);
104 | intent.setPackage("com.google.android.apps.maps");
105 | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
106 | startActivity(intent);
107 | } catch (ActivityNotFoundException e) {
108 | Uri uri = Uri.parse("https://google.com/store/apps/details?id=com.google.android.apps.maps");
109 | Intent intent = new Intent(Intent.ACTION_VIEW, uri);
110 | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
111 | startActivity(intent);
112 | }
113 | }
114 |
115 | private void notification(){
116 |
117 | String name = Name.getText().toString();
118 | String message = " Your Order Is Placed.";
119 | if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){
120 | NotificationChannel channel=new NotificationChannel("n","n", NotificationManager.IMPORTANCE_DEFAULT);
121 |
122 | NotificationManager manager= getActivity().getSystemService(NotificationManager.class);
123 | manager.createNotificationChannel(channel);
124 | }
125 |
126 | NotificationCompat.Builder builder= new NotificationCompat.Builder(getContext(),"n")
127 | .setContentText("Clitz - A Restaurant App")
128 | .setSmallIcon(R.drawable.notification)
129 | .setAutoCancel(true)
130 | .setContentText(name + message);
131 |
132 | NotificationManagerCompat managerCompat = NotificationManagerCompat.from(getContext());
133 | managerCompat.notify(999,builder.build());
134 | }
135 |
136 | }
137 |
138 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/DineInOrderPlaced.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.widget.TextView;
6 |
7 | import androidx.appcompat.app.AppCompatActivity;
8 |
9 | public class DineInOrderPlaced extends AppCompatActivity {
10 |
11 | @Override
12 | protected void onCreate(Bundle savedInstanceState) {
13 | super.onCreate(savedInstanceState);
14 | setContentView(R.layout.activity_dine_in_order_placed);
15 |
16 | TextView tableNumber = findViewById(R.id.tableNumber);
17 |
18 | Intent i = getIntent();
19 | String str = getIntent().getStringExtra("QR");
20 |
21 | tableNumber.setText(str);
22 | }
23 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/HDPage1Fragment.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.TextView;
9 |
10 | import androidx.fragment.app.Fragment;
11 |
12 | public class HDPage1Fragment extends Fragment {
13 |
14 | @Override
15 | public View onCreateView(LayoutInflater inflater,ViewGroup container, Bundle savedInstanceState) {
16 | ViewGroup root = (ViewGroup) inflater.inflate(R.layout.fragment_hd_page1, container, false);
17 |
18 | TextView tv = root.findViewById(R.id.textViewSkip1);
19 | tv.setOnClickListener(new View.OnClickListener() {
20 | @Override
21 | public void onClick(View v) {
22 | Intent i = new Intent(getContext(),MenuList.class);
23 | startActivity(i);
24 | }
25 | });
26 |
27 | return root;
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/HDPage2Fragment.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.TextView;
9 |
10 | import androidx.fragment.app.Fragment;
11 |
12 | public class HDPage2Fragment extends Fragment {
13 |
14 |
15 | @Override
16 | public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState) {
17 | ViewGroup root = (ViewGroup) inflater.inflate(R.layout.fragment_hd_page2, container, false);
18 |
19 | TextView tv = root.findViewById(R.id.textViewSkip2);
20 | tv.setOnClickListener(new View.OnClickListener() {
21 | @Override
22 | public void onClick(View v) {
23 | Intent i = new Intent(getContext(),MenuList.class);
24 | startActivity(i);
25 | }
26 | });
27 |
28 | return root;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/HDPage3Fragment.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.TextView;
9 |
10 | import androidx.annotation.Nullable;
11 | import androidx.fragment.app.Fragment;
12 |
13 | public class HDPage3Fragment extends Fragment {
14 |
15 | @Nullable
16 | @org.jetbrains.annotations.Nullable
17 | @Override
18 | public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState) {
19 | ViewGroup root = (ViewGroup) inflater.inflate(R.layout.fragment_hd_page3, container, false);
20 |
21 | TextView tv = root.findViewById(R.id.textViewSkip3);
22 | tv.setOnClickListener(new View.OnClickListener() {
23 | @Override
24 | public void onClick(View v) {
25 | Intent i = new Intent(getContext(),MenuList.class);
26 | startActivity(i);
27 | }
28 | });
29 |
30 | return root;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/HDPage4Fragment.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.TextView;
9 |
10 | import androidx.fragment.app.Fragment;
11 |
12 | public class HDPage4Fragment extends Fragment {
13 | @Override
14 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
15 | ViewGroup root = (ViewGroup) inflater.inflate(R.layout.fragment_hd_page4, container, false);
16 |
17 | TextView tv = root.findViewById(R.id.textViewSkip4);
18 | tv.setOnClickListener(new View.OnClickListener() {
19 | @Override
20 | public void onClick(View v) {
21 | Intent i = new Intent(getContext(),MenuList.class);
22 | startActivity(i);
23 | }
24 | });
25 |
26 | return root;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/HDPage5Fragment.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.Button;
9 | import android.widget.TextView;
10 |
11 | import androidx.fragment.app.Fragment;
12 |
13 | public class HDPage5Fragment extends Fragment {
14 |
15 | @Override
16 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
17 | ViewGroup root = (ViewGroup) inflater.inflate(R.layout.fragment_hd_page5, container, false);
18 |
19 | Button next = (Button) root.findViewById(R.id.next);
20 |
21 | next.setOnClickListener(new View.OnClickListener() {
22 | @Override
23 | public void onClick(View v) {
24 | Intent i = new Intent(getActivity(), MenuList.class);
25 | startActivity(i);
26 | }
27 | });
28 |
29 |
30 | TextView tv = root.findViewById(R.id.textViewSkip5);
31 | tv.setOnClickListener(new View.OnClickListener() {
32 | @Override
33 | public void onClick(View v) {
34 | Intent i = new Intent(getContext(),MenuList.class);
35 | startActivity(i);
36 | }
37 | });
38 |
39 | return root;
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/HomeDeliveryLiquidSwipe.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import android.os.Bundle;
4 |
5 | import androidx.annotation.NonNull;
6 | import androidx.appcompat.app.AppCompatActivity;
7 | import androidx.fragment.app.Fragment;
8 | import androidx.fragment.app.FragmentManager;
9 | import androidx.fragment.app.FragmentStatePagerAdapter;
10 | import androidx.viewpager.widget.ViewPager;
11 |
12 | public class HomeDeliveryLiquidSwipe extends AppCompatActivity {
13 |
14 | private static final int NUM_PAGES = 5;
15 | private ViewPager viewPager;
16 | private ScreenSlidePagerAdapter pagerAdapter;
17 |
18 | @Override
19 | protected void onCreate(Bundle savedInstanceState) {
20 | super.onCreate(savedInstanceState);
21 | setContentView(R.layout.activity_home_delivery_liquid_swipe);
22 | // getSupportActionBar().hide();
23 |
24 | viewPager = findViewById(R.id.pager);
25 | pagerAdapter = new ScreenSlidePagerAdapter(getSupportFragmentManager());
26 | viewPager.setAdapter(pagerAdapter);
27 | }
28 |
29 | private class ScreenSlidePagerAdapter extends FragmentStatePagerAdapter{
30 |
31 | public ScreenSlidePagerAdapter(FragmentManager fm)
32 | {
33 | super(fm);
34 | }
35 |
36 | @NonNull
37 | @Override
38 | public Fragment getItem(int position) {
39 | switch (position){
40 | case 0:
41 | HDPage1Fragment tab1 = new HDPage1Fragment();
42 | return tab1;
43 | case 1:
44 | HDPage2Fragment tab2 = new HDPage2Fragment();
45 | return tab2;
46 | case 2:
47 | HDPage3Fragment tab3 = new HDPage3Fragment();
48 | return tab3;
49 | case 3:
50 | HDPage4Fragment tab4 = new HDPage4Fragment();
51 | return tab4;
52 | case 4:
53 | HDPage5Fragment tab5 = new HDPage5Fragment();
54 | return tab5;
55 | }
56 | return null;
57 | }
58 |
59 | @Override
60 | public int getCount() {
61 | return NUM_PAGES;
62 | }
63 | }
64 | }
65 |
66 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/Listener/ICartLoadListener.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp.Listener;
2 |
3 |
4 |
5 |
6 | import com.example.clitz_arestaurantapp.Model.CartModel;
7 | import com.example.clitz_arestaurantapp.Model.DrinkModel;
8 |
9 | import java.util.List;
10 |
11 | public interface ICartLoadListener {
12 |
13 | void onDrinkLoadSuccess(List drinkModelList);
14 |
15 | void onDrinkLoadFailed(String message);
16 |
17 | void onCartLoadSuccess(List cartModelList);
18 | void onCartLoadFailed(String message);
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/Listener/IDrinkLoadListener.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp.Listener;
2 |
3 |
4 |
5 |
6 |
7 | import com.example.clitz_arestaurantapp.Model.DrinkModel;
8 |
9 | import java.util.List;
10 |
11 | public interface IDrinkLoadListener {
12 |
13 | void onDrinkLoadSuccess(List drinkModelList);
14 | void onDrinkLoadFailed(String message);
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/Listener/IRecyclerViewClickListener.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp.Listener;
2 |
3 | import android.view.View;
4 |
5 | public interface IRecyclerViewClickListener {
6 | void onRecycleerClick(View view, int position);
7 | }
8 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/LoginAdapter.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.fragment.app.Fragment;
6 | import androidx.fragment.app.FragmentManager;
7 | import androidx.fragment.app.FragmentPagerAdapter;
8 |
9 | public class LoginAdapter extends FragmentPagerAdapter {
10 |
11 | private Context context;
12 | int totalTabs;
13 |
14 | public LoginAdapter(FragmentManager fm, Context c, int totalTabs) {
15 | super(fm);
16 | this.context = c;
17 | this.totalTabs = totalTabs;
18 |
19 | }
20 |
21 | public Fragment getItem(int position) {
22 | switch (position){
23 | case 0:
24 | login_tab l = new login_tab();
25 | return l;
26 | case 1:
27 | sign_up_tab s = new sign_up_tab();
28 | return s;
29 | default:
30 | return null;
31 | }
32 | }
33 |
34 | @Override
35 | public int getCount() {
36 | return totalTabs;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import android.os.Bundle;
4 |
5 | import androidx.appcompat.app.AppCompatActivity;
6 | import androidx.constraintlayout.widget.ConstraintLayout;
7 | import androidx.viewpager.widget.ViewPager;
8 |
9 | import com.google.android.material.tabs.TabLayout;
10 |
11 | public class MainActivity extends AppCompatActivity {
12 |
13 | @Override
14 | protected void onCreate(Bundle savedInstanceState) {
15 | super.onCreate(savedInstanceState);
16 | setContentView(R.layout.activity_main);
17 | // getSupportActionBar().setDisplayHomeAsUpEnabled(false);
18 | // getSupportActionBar().hide();
19 |
20 | ConstraintLayout cl;
21 | cl = findViewById(R.id.layoutConstraintImage);
22 | cl.getBackground().setAlpha(200);
23 |
24 | TabLayout tablayout;
25 | ViewPager viewpager;
26 |
27 | tablayout = findViewById(R.id.tab_layout);
28 | viewpager = findViewById(R.id.view_pager);
29 |
30 | tablayout.addTab(tablayout.newTab().setText("Log In"));
31 | tablayout.addTab(tablayout.newTab().setText("Sign Up"));
32 | tablayout.setTabGravity(TabLayout.GRAVITY_FILL);
33 |
34 | final LoginAdapter adapter = new LoginAdapter(getSupportFragmentManager(),this, tablayout.getTabCount());
35 | viewpager.setAdapter(adapter);
36 | viewpager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tablayout));
37 | viewpager.setAdapter(adapter);
38 |
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/MenuList.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.view.View;
6 | import android.widget.FrameLayout;
7 | import android.widget.RelativeLayout;
8 |
9 | import androidx.annotation.NonNull;
10 | import androidx.appcompat.app.AppCompatActivity;
11 | import androidx.recyclerview.widget.GridLayoutManager;
12 | import androidx.recyclerview.widget.RecyclerView;
13 |
14 | import com.example.clitz_arestaurantapp.Adapter.MyDrinkAdapter;
15 | import com.example.clitz_arestaurantapp.Listener.ICartLoadListener;
16 | import com.example.clitz_arestaurantapp.Listener.IDrinkLoadListener;
17 | import com.example.clitz_arestaurantapp.Model.CartModel;
18 | import com.example.clitz_arestaurantapp.Model.DrinkModel;
19 | import com.example.clitz_arestaurantapp.Utils.SpaceItemDecoration;
20 | import com.example.clitz_arestaurantapp.eventBus.myUpdateCartEvent;
21 | import com.google.android.material.snackbar.Snackbar;
22 | import com.google.firebase.database.DataSnapshot;
23 | import com.google.firebase.database.DatabaseError;
24 | import com.google.firebase.database.FirebaseDatabase;
25 | import com.google.firebase.database.ValueEventListener;
26 | import com.nex3z.notificationbadge.NotificationBadge;
27 |
28 | import org.greenrobot.eventbus.EventBus;
29 | import org.greenrobot.eventbus.Subscribe;
30 | import org.greenrobot.eventbus.ThreadMode;
31 |
32 | import java.util.ArrayList;
33 | import java.util.List;
34 |
35 | import butterknife.BindView;
36 | import butterknife.ButterKnife;
37 |
38 |
39 |
40 |
41 | public class MenuList extends AppCompatActivity implements ICartLoadListener, IDrinkLoadListener {
42 |
43 | @BindView(R.id.recycler_drink)
44 | RecyclerView recycler_drink;
45 | @BindView(R.id.mainLayout)
46 | RelativeLayout mainLayout;
47 | @BindView(R.id.badge)
48 | NotificationBadge badge;
49 | @BindView(R.id.btnCart)
50 | FrameLayout btnCart;
51 |
52 | IDrinkLoadListener drinkLoadListener;
53 | ICartLoadListener cartLoadListener;
54 |
55 | @Override
56 | protected void onStart(){
57 | super.onStart();
58 | EventBus.getDefault().register(this);
59 | }
60 |
61 | @Override
62 | protected void onStop(){
63 | if(EventBus.getDefault().hasSubscriberForEvent(myUpdateCartEvent.class));
64 | EventBus.getDefault().removeStickyEvent(myUpdateCartEvent.class);
65 | EventBus.getDefault().unregister(this);
66 | super.onStop();
67 | }
68 |
69 | @Subscribe(threadMode = ThreadMode.MAIN,sticky = true)
70 | public void onUpdateCart(myUpdateCartEvent event){
71 | countCartItem();
72 | }
73 |
74 |
75 | @Override
76 | protected void onCreate(Bundle savedInstanceState) {
77 | super.onCreate(savedInstanceState);
78 | setContentView(R.layout.activity_menu_list);
79 | //getSupportActionBar().hide();
80 |
81 | init();
82 | loadDrinkFromFirebase();
83 | countCartItem();
84 | }
85 |
86 | private void loadDrinkFromFirebase() {
87 | List drinkModels = new ArrayList<>();
88 | FirebaseDatabase.getInstance()
89 | .getReference("Drink")
90 | .addListenerForSingleValueEvent(new ValueEventListener() {
91 | @Override
92 | public void onDataChange(@NonNull DataSnapshot snapshot) {
93 | if (snapshot.exists())
94 | {
95 | for(DataSnapshot drinkSnapshot:snapshot.getChildren())
96 | {
97 | DrinkModel drinkModel = drinkSnapshot.getValue(DrinkModel.class);
98 | assert drinkModel != null;
99 | drinkModel.setKey(drinkSnapshot.getKey());
100 | drinkModels.add(drinkModel);
101 | }
102 | drinkLoadListener.onDrinkLoadSuccess(drinkModels);
103 | }
104 | else
105 | {
106 | drinkLoadListener.onDrinkLoadFailed("Can't able to find drinks");
107 | }
108 | }
109 |
110 | @Override
111 | public void onCancelled(@NonNull DatabaseError error) {
112 | drinkLoadListener.onDrinkLoadFailed(error.getMessage());
113 | }
114 | });
115 | }
116 | public void init(){
117 | ButterKnife.bind(this);
118 | drinkLoadListener = this;
119 | cartLoadListener = this;
120 |
121 | GridLayoutManager gridLayoutManager = new GridLayoutManager(this,2);
122 | recycler_drink.setLayoutManager(gridLayoutManager);
123 | recycler_drink.addItemDecoration(new SpaceItemDecoration());
124 |
125 | btnCart.setOnClickListener(new View.OnClickListener() {
126 | @Override
127 | public void onClick(View v) {
128 | Intent i = new Intent(getApplicationContext(), CartActivity.class);
129 | startActivity(i);
130 | }
131 | });
132 | }
133 |
134 |
135 | @Override
136 | public void onDrinkLoadSuccess(List drinkModelList) {
137 | MyDrinkAdapter adapter = new MyDrinkAdapter(this, drinkModelList,cartLoadListener);
138 | recycler_drink.setAdapter(adapter);
139 |
140 | }
141 |
142 | @Override
143 | public void onDrinkLoadFailed(String message) {
144 | Snackbar.make(mainLayout,message, Snackbar.LENGTH_LONG).show();
145 | }
146 |
147 | @Override
148 | public void onCartLoadSuccess(List cartModelList) {
149 | int cartSum=0;
150 | for (CartModel cartModel: cartModelList)
151 | cartSum += cartModel.getQuantity();
152 | badge.setNumber(cartSum);
153 | }
154 |
155 | @Override
156 | public void onCartLoadFailed(String message) {
157 | Snackbar.make(mainLayout,message, Snackbar.LENGTH_LONG).show();
158 | }
159 |
160 | @Override
161 | protected void onResume(){
162 | super.onResume();
163 | countCartItem();
164 | }
165 |
166 |
167 | private void countCartItem() {
168 | List cartModels = new ArrayList<>();
169 | FirebaseDatabase
170 | .getInstance()
171 | .getReference("Cart")
172 | .child("UNIQUE_USER_ID")
173 | .addListenerForSingleValueEvent(new ValueEventListener() {
174 | @Override
175 | public void onDataChange(@NonNull DataSnapshot snapshot) {
176 | for(DataSnapshot cartSnapshot:snapshot.getChildren())
177 | {
178 | CartModel cartModel = cartSnapshot.getValue(CartModel.class);
179 | cartModel.setKey(cartSnapshot.getKey());
180 | cartModels.add(cartModel);
181 | }
182 | cartLoadListener.onCartLoadSuccess(cartModels);
183 | }
184 |
185 | @Override
186 | public void onCancelled(@NonNull DatabaseError error) {
187 | cartLoadListener.onCartLoadFailed(error.getMessage());
188 | }
189 | });
190 |
191 | }
192 |
193 | @Override
194 | public void onPointerCaptureChanged(boolean hasCapture) {
195 |
196 | }
197 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/Model/CartModel.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp.Model;
2 |
3 | public class CartModel {
4 | private String key,name,price,image;
5 | private int quantity;
6 | private float totalPrice;
7 |
8 | public CartModel() {
9 | }
10 |
11 | public String getKey() {
12 | return key;
13 | }
14 |
15 | public void setKey(String key) {
16 | this.key = key;
17 | }
18 |
19 | public String getName() {
20 | return name;
21 | }
22 |
23 | public void setName(String name) {
24 | this.name = name;
25 | }
26 |
27 | public String getPrice() {
28 | return price;
29 | }
30 |
31 | public void setPrice(String price) {
32 | this.price = price;
33 | }
34 |
35 | public String getImage() {
36 | return image;
37 | }
38 |
39 | public void setImage(String image) {
40 | this.image = image;
41 | }
42 |
43 | public int getQuantity() {
44 | return quantity;
45 | }
46 |
47 | public void setQuantity(int quantity) {
48 | this.quantity = quantity;
49 | }
50 |
51 | public float getTotalPrice() {
52 | return totalPrice;
53 | }
54 |
55 | public void setTotalPrice(float totalPrice) {
56 | this.totalPrice = totalPrice;
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/Model/CustomerDetails.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp.Model;
2 |
3 | public class CustomerDetails {
4 |
5 | private String Name;
6 | private String Number;
7 | private String Address;
8 | private String City;
9 | private String State;
10 | private String Pincode;
11 |
12 | public CustomerDetails(){
13 |
14 | }
15 |
16 | public CustomerDetails(String name,String number, String address, String city, String state, String pincode) {
17 | Name = name;
18 | Address = address;
19 | Number= number;
20 | City = city;
21 | State = state;
22 | Pincode = pincode;
23 | }
24 |
25 | public String getName() {
26 | return Name;
27 | }
28 |
29 | public void setName(String name) {
30 | Name = name;
31 | }
32 |
33 | public String getNumber() {
34 | return Number;
35 | }
36 |
37 | public void setNumber(String number) {
38 | Number = number;
39 | }
40 |
41 | public String getAddress() {
42 | return Address;
43 | }
44 |
45 | public void setAddress(String address) {
46 | Address = address;
47 | }
48 |
49 | public String getCity() {
50 | return City;
51 | }
52 |
53 | public void setCity(String city) {
54 | City = city;
55 | }
56 |
57 | public String getState() {
58 | return State;
59 | }
60 |
61 | public void setState(String state) {
62 | State = state;
63 | }
64 |
65 | public String getPincode() {
66 | return Pincode;
67 | }
68 |
69 | public void setPincode(String pincode) {
70 | Pincode = pincode;
71 | }
72 |
73 | }
74 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/Model/DrinkModel.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp.Model;
2 |
3 | public class DrinkModel {
4 |
5 | private String key,name,price,image;
6 |
7 | public DrinkModel() {
8 | }
9 |
10 | public String getKey() {
11 | return key;
12 | }
13 |
14 | public void setKey(String key) {
15 | this.key = key;
16 | }
17 |
18 | public String getName() {
19 | return name;
20 | }
21 |
22 | public void setName(String name) {
23 | this.name = name;
24 | }
25 |
26 | public String getPrice() {
27 | return price;
28 | }
29 |
30 | public void setPrice(String price) {
31 | this.price = price;
32 | }
33 |
34 | public String getImage() {
35 | return image;
36 | }
37 |
38 | public void setImage(String image) {
39 | this.image = image;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/Model/User.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp.Model;
2 |
3 | public class User {
4 |
5 | private String Name;
6 | private String Password;
7 | private String Email;
8 |
9 |
10 | public User() {
11 |
12 | }
13 |
14 | public User(String name, String password) {
15 | Name = name;
16 | Password = password;
17 |
18 | }
19 |
20 | public String getName() {
21 | return Name;
22 | }
23 |
24 | public void setName(String name) {
25 | Name = name;
26 | }
27 |
28 | public String getPassword() {
29 | return Password;
30 | }
31 |
32 | public void setPassword(String password) {
33 | Password = password;
34 | }
35 |
36 | public String getEmail() {
37 | return Email;
38 | }
39 |
40 | public void setEmail(String email) {
41 | Email = email;
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/PlaceYourOrder.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import android.os.Bundle;
4 | import android.view.View;
5 | import android.widget.RadioButton;
6 |
7 | import androidx.appcompat.app.AppCompatActivity;
8 | import androidx.fragment.app.Fragment;
9 |
10 | public class PlaceYourOrder extends AppCompatActivity {
11 |
12 | @Override
13 | protected void onCreate(Bundle savedInstanceState) {
14 | super.onCreate(savedInstanceState);
15 | setContentView(R.layout.activity_place_your_order);
16 | //getSupportActionBar().hide();
17 |
18 | Fragment deliveryFragment = new DeliveryFragment();
19 | Fragment qrCodeFragment = new QrCodeFragment();
20 | RadioButton dineInBtn = findViewById(R.id.dineInBtn);
21 | RadioButton deliveryBtn = findViewById(R.id.deliveryBtn);
22 |
23 |
24 | getSupportFragmentManager().beginTransaction().replace(R.id.flLayout, qrCodeFragment).commit();
25 |
26 | dineInBtn.setOnClickListener(new View.OnClickListener() {
27 | @Override
28 | public void onClick(View v) {
29 | getSupportFragmentManager().beginTransaction().replace(R.id.flLayout,qrCodeFragment ).commit();
30 | }
31 | });
32 |
33 | deliveryBtn.setOnClickListener(new View.OnClickListener() {
34 | @Override
35 | public void onClick(View v) {
36 | getSupportFragmentManager().beginTransaction().replace(R.id.flLayout, deliveryFragment).commit();
37 | }
38 | });
39 |
40 | }
41 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/QrCodeFragment.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import android.app.Activity;
4 | import android.app.NotificationChannel;
5 | import android.app.NotificationManager;
6 | import android.content.DialogInterface;
7 | import android.content.Intent;
8 | import android.os.Build;
9 | import android.os.Bundle;
10 | import android.view.LayoutInflater;
11 | import android.view.View;
12 | import android.view.ViewGroup;
13 | import android.widget.Button;
14 |
15 | import androidx.annotation.Nullable;
16 | import androidx.appcompat.app.AlertDialog;
17 | import androidx.core.app.NotificationCompat;
18 | import androidx.core.app.NotificationManagerCompat;
19 | import androidx.fragment.app.Fragment;
20 |
21 | import com.blikoon.qrcodescanner.QrCodeActivity;
22 |
23 |
24 | public class QrCodeFragment extends Fragment {
25 |
26 | private Button button;
27 | private static final int REQUEST_CODE_QR_SCAN= 101;
28 | private final String[] C = new String[]{"TABLE1", "TABLE2", "TABLE3", "TABLE4"};
29 | private final String LOGTAG = "Scan your QR";
30 |
31 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
32 | ViewGroup v = (ViewGroup) inflater.inflate(R.layout.fragment_qr_code, container, false);
33 |
34 | button =v.findViewById(R.id.scanButton);
35 | button.setOnClickListener(new View.OnClickListener() {
36 | @Override
37 | public void onClick(View v) {
38 | Intent i = new Intent(getContext(), QrCodeActivity.class);
39 | startActivityForResult(i, REQUEST_CODE_QR_SCAN);
40 | }
41 | });
42 | return v;
43 | }
44 |
45 | @Override
46 | public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
47 | super.onActivityResult(requestCode, resultCode, data);
48 | if (resultCode != Activity.RESULT_OK) {
49 | if (data == null)
50 | return;
51 | //Getting the passed result
52 | String result = data.getStringExtra("com.blikoon.qrcodescanner.error_decoding_image");
53 | if (result != null) {
54 | AlertDialog alertDialog = new AlertDialog.Builder(getContext()).create();
55 | alertDialog.setTitle("Scan Error");
56 | alertDialog.setMessage("QR Code could not be scanned");
57 | alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, "OK",
58 | new DialogInterface.OnClickListener() {
59 | public void onClick(DialogInterface dialog, int which) {
60 | dialog.dismiss();
61 | }
62 | });
63 | alertDialog.show();
64 | }
65 | return;
66 |
67 | }
68 | if (requestCode == REQUEST_CODE_QR_SCAN) {
69 | if (data == null)
70 | return;
71 | //Getting the passed result
72 | String result = data.getStringExtra("com.blikoon.qrcodescanner.got_qr_scan_relult");
73 | if (result.equals(C[0]) || result.equals(C[1]) || result.equals(C[2]) || result.equals(C[3]) )
74 | {
75 | Intent i = new Intent(getContext(), DineInOrderPlaced.class);
76 | i.putExtra("QR", result.toString());
77 | startActivity(i);
78 | notification();
79 | }
80 | }
81 | }
82 |
83 | private void notification(){
84 |
85 | String message = " Your Order Is placed and arrived to your table soon.";
86 | if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){
87 | NotificationChannel channel=new NotificationChannel("n","n", NotificationManager.IMPORTANCE_DEFAULT);
88 |
89 | NotificationManager manager= getActivity().getSystemService(NotificationManager.class);
90 | manager.createNotificationChannel(channel);
91 | }
92 |
93 | NotificationCompat.Builder builder= new NotificationCompat.Builder(getContext(),"n")
94 | .setContentText("Clitz - A Restauranr App")
95 | .setSmallIcon(R.drawable.notification)
96 | .setAutoCancel(true)
97 | .setContentText(message);
98 |
99 | NotificationManagerCompat managerCompat = NotificationManagerCompat.from(getContext());
100 | managerCompat.notify(999,builder.build());
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/SliderAdapter.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import android.view.LayoutInflater;
4 | import android.view.View;
5 | import android.view.ViewGroup;
6 | import android.widget.ImageView;
7 | import com.smarteist.autoimageslider.SliderView;
8 | import com.smarteist.autoimageslider.SliderViewAdapter;
9 |
10 | public class SliderAdapter extends SliderViewAdapter {
11 |
12 | int[] images;
13 |
14 | public SliderAdapter(int[] images) {
15 | this.images = images;
16 | }
17 |
18 | @Override
19 | public Holder onCreateViewHolder(ViewGroup parent) {
20 | View view = LayoutInflater.from(parent.getContext())
21 | .inflate(R.layout.slider_images, parent, false);
22 |
23 | return new Holder(view);
24 | }
25 |
26 | @Override
27 | public void onBindViewHolder(Holder viewHolder, int position) {
28 |
29 | viewHolder.imageview.setImageResource(images[position]);
30 | }
31 |
32 | @Override
33 | public int getCount() {
34 | return images.length;
35 | }
36 |
37 |
38 | public class Holder extends SliderViewAdapter.ViewHolder{
39 |
40 | ImageView imageview;
41 | public Holder(View itemView){
42 | super(itemView);
43 |
44 | imageview = itemView.findViewById(R.id.image_view);
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/Splashscreen.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import androidx.appcompat.app.AppCompatActivity;
4 |
5 | import android.app.Activity;
6 | import android.content.Intent;
7 | import android.os.Bundle;
8 | import android.os.Handler;
9 |
10 | public class Splashscreen extends Activity {
11 |
12 | public static int SPLASH_TIME_OUT = 4000;
13 | @Override
14 | protected void onCreate(Bundle savedInstanceState) {
15 | super.onCreate(savedInstanceState);
16 | setContentView(R.layout.activity_splashscreen);
17 |
18 | new Handler().postDelayed(new Runnable() {
19 | @Override
20 | public void run() {
21 | Intent i = new Intent(Splashscreen.this, MainActivity.class);
22 | startActivity(i);
23 | finish();
24 | }
25 | }, SPLASH_TIME_OUT);
26 | }
27 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/Utils/SpaceItemDecoration.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp.Utils;
2 |
3 | import android.graphics.Rect;
4 | import android.view.View;
5 |
6 | import androidx.annotation.NonNull;
7 | import androidx.recyclerview.widget.RecyclerView;
8 |
9 | public class SpaceItemDecoration extends RecyclerView.ItemDecoration {
10 |
11 | @Override
12 | public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
13 | if(parent.getChildLayoutPosition(view) %2 != 0)
14 | {
15 | outRect.top = 50;
16 | outRect.bottom = -50;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/eventBus/myUpdateCartEvent.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp.eventBus;
2 |
3 | public class myUpdateCartEvent {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/login_tab.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import android.app.ProgressDialog;
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.Button;
10 | import android.widget.EditText;
11 | import android.widget.Toast;
12 |
13 | import androidx.fragment.app.Fragment;
14 |
15 | import com.example.clitz_arestaurantapp.Model.User;
16 | import com.google.firebase.database.DataSnapshot;
17 | import com.google.firebase.database.DatabaseError;
18 | import com.google.firebase.database.DatabaseReference;
19 | import com.google.firebase.database.FirebaseDatabase;
20 | import com.google.firebase.database.ValueEventListener;
21 |
22 | public class login_tab extends Fragment {
23 |
24 | EditText editPhone, editPassword;
25 | Button btnLogIn;
26 |
27 | @Override
28 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
29 | ViewGroup v = (ViewGroup) inflater.inflate(R.layout.fragment_login_tab, container, false);
30 |
31 |
32 | editPhone = v.findViewById(R.id.phone);
33 | editPassword = v.findViewById(R.id.password);
34 | btnLogIn = v.findViewById(R.id.log_in);
35 |
36 | //init Firebase
37 | final FirebaseDatabase database = FirebaseDatabase.getInstance();
38 | final DatabaseReference table_user = database.getReference("User");
39 |
40 | btnLogIn.setOnClickListener(new View.OnClickListener() {
41 | @Override
42 | public void onClick(View v) {
43 |
44 | final ProgressDialog mDialog = new ProgressDialog(getContext());
45 | mDialog.setMessage("Please wait...");
46 | mDialog.show();
47 |
48 | table_user.addValueEventListener(new ValueEventListener() {
49 |
50 |
51 | @Override
52 | public void onDataChange(DataSnapshot dataSnapshot) {
53 |
54 | //Check if user not exist in Database
55 | if(dataSnapshot.child(editPhone.getText().toString()).exists()) {
56 | //Get user information
57 | mDialog.dismiss();
58 | User user = dataSnapshot.child(editPhone.getText().toString()).getValue(User.class);
59 | user.setEmail(editPhone.getText().toString());//set phone
60 | if (user.getPassword().equals(editPassword.getText().toString())) {
61 | Intent i = new Intent(getContext(), HomeDeliveryLiquidSwipe.class);
62 | startActivity(i);
63 | Toast.makeText(getContext(), "Sign in success!!!", Toast.LENGTH_SHORT).show();
64 | } else {
65 | Toast.makeText(getContext(), "Wrong password!!!", Toast.LENGTH_SHORT).show();
66 | }
67 | }else {
68 | mDialog.dismiss();
69 | Toast.makeText(getContext(), "User not exist in database!", Toast.LENGTH_SHORT).show();
70 | }
71 | }
72 | @Override
73 | public void onCancelled(DatabaseError databaseError) {
74 |
75 | }
76 | });
77 | }
78 | });
79 | return v;
80 | }
81 |
82 | }
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/sign_up_tab.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import android.app.NotificationChannel;
4 | import android.app.NotificationManager;
5 | import android.app.ProgressDialog;
6 | import android.os.Build;
7 | import android.os.Bundle;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.view.ViewGroup;
11 | import android.widget.Button;
12 | import android.widget.EditText;
13 | import android.widget.Toast;
14 |
15 | import androidx.core.app.NotificationCompat;
16 | import androidx.core.app.NotificationManagerCompat;
17 | import androidx.fragment.app.Fragment;
18 |
19 | import com.example.clitz_arestaurantapp.Model.User;
20 | import com.google.firebase.database.DataSnapshot;
21 | import com.google.firebase.database.DatabaseError;
22 | import com.google.firebase.database.DatabaseReference;
23 | import com.google.firebase.database.FirebaseDatabase;
24 | import com.google.firebase.database.ValueEventListener;
25 |
26 | public class sign_up_tab extends Fragment {
27 |
28 | EditText editPhone, editName, editPassword;
29 | Button btnSignUp;
30 |
31 | @Override
32 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
33 | ViewGroup v = (ViewGroup) inflater.inflate(R.layout.fragment_sign_up_tab, container, false);
34 |
35 | editPhone = v.findViewById(R.id.phone);
36 | editName = v.findViewById(R.id.name);
37 | editPassword = v.findViewById(R.id.password);
38 | btnSignUp = v.findViewById(R.id.sign_up);
39 |
40 | final FirebaseDatabase database = FirebaseDatabase.getInstance();
41 | final DatabaseReference table_user = database.getReference("User");
42 |
43 | btnSignUp.setOnClickListener(new View.OnClickListener() {
44 | @Override
45 | public void onClick(View v) {
46 | final ProgressDialog mDialog = new ProgressDialog(getContext());
47 | mDialog.setMessage("Please wait...");
48 | mDialog.show();
49 |
50 | table_user.addValueEventListener(new ValueEventListener() {
51 | @Override
52 | public void onDataChange(DataSnapshot dataSnapshot) {
53 |
54 | //Check if user phone number already exist
55 | if(dataSnapshot.child(editPhone.getText().toString()).exists()){
56 | mDialog.dismiss();
57 | Toast.makeText(getContext(), "Phone Number already register!!!", Toast.LENGTH_SHORT).show();
58 |
59 | }else {
60 | mDialog.dismiss();
61 | User user = new User(editName.getText().toString(), editPassword.getText().toString());
62 | table_user.child(editPhone.getText().toString()).setValue(user);
63 | Toast.makeText(getContext(), "Sign Up Successfully", Toast.LENGTH_SHORT).show();
64 | notification();
65 | }
66 |
67 | }
68 |
69 |
70 |
71 | @Override
72 | public void onCancelled(DatabaseError databaseError) {
73 |
74 | }
75 | });
76 | }
77 | });
78 |
79 | return v;
80 | }
81 |
82 | private void notification(){
83 |
84 | String name = editName.getText().toString();
85 | String message = " You have Sign Up Successfully";
86 | if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){
87 | NotificationChannel channel=new NotificationChannel("n","n", NotificationManager.IMPORTANCE_DEFAULT);
88 |
89 | NotificationManager manager= getActivity().getSystemService(NotificationManager.class);
90 | manager.createNotificationChannel(channel);
91 | }
92 |
93 | NotificationCompat.Builder builder= new NotificationCompat.Builder(getContext(),"n")
94 | .setContentText("Clitz - A Restaurant App")
95 | .setSmallIcon(R.drawable.notification)
96 | .setAutoCancel(true)
97 | .setContentText(name + message);
98 |
99 | NotificationManagerCompat managerCompat = NotificationManagerCompat.from(getContext());
100 | managerCompat.notify(999,builder.build());
101 | }
102 | }
103 |
104 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/clitz_arestaurantapp/xyz.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import androidx.appcompat.app.AppCompatActivity;
4 |
5 | import android.os.Bundle;
6 |
7 | public class xyz extends AppCompatActivity {
8 |
9 | @Override
10 | protected void onCreate(Bundle savedInstanceState) {
11 | super.onCreate(savedInstanceState);
12 | setContentView(R.layout.activity_xyz);
13 | }
14 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_baseline_login_order.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
15 |
18 |
21 |
22 |
23 |
24 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/product.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable-v24/product.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/radio_normal.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/radio_selected.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/radio_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/text_color.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/auto_image_slider_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable/auto_image_slider_1.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/auto_image_slider_10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable/auto_image_slider_10.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/auto_image_slider_11.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable/auto_image_slider_11.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/auto_image_slider_4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable/auto_image_slider_4.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/auto_image_slider_5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable/auto_image_slider_5.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/auto_image_slider_8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable/auto_image_slider_8.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/capture_logo.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable/capture_logo.PNG
--------------------------------------------------------------------------------
/app/src/main/res/drawable/clitz_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable/clitz_logo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/clitz_logo_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable/clitz_logo_1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/edit_text_box_border.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
9 |
13 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/gif22.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable/gif22.gif
--------------------------------------------------------------------------------
/app/src/main/res/drawable/gif_order_placed.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable/gif_order_placed.gif
--------------------------------------------------------------------------------
/app/src/main/res/drawable/giphy.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable/giphy.gif
--------------------------------------------------------------------------------
/app/src/main/res/drawable/home_delivery_btn.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_add_box_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_arrow_back_ios_new_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_arrow_forward_24.xml:
--------------------------------------------------------------------------------
1 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_chevron_right_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
14 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_clear_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_indeterminate_check_box_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_lock_open_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_login_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_mail_outline_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_navigate_next_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_person_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_phone_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_shopping_cart_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
15 |
18 |
21 |
22 |
23 |
24 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/imagebehindlogo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable/imagebehindlogo.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/img1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable/img1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/img2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable/img2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/img3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable/img3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/img4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable/img4.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/img5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable/img5.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable/logo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable/notification.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/sign_in_button_border.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
9 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/unsplash1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/drawable/unsplash1.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/view_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_auto_image_slider.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
25 |
26 |
27 |
28 |
43 |
44 |
61 |
62 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_cart.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
12 |
19 |
20 |
27 |
28 |
29 |
41 |
42 |
43 |
44 |
45 |
52 |
53 |
54 |
55 |
56 |
62 |
63 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_dine_in_order_placed.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
21 |
22 |
38 |
39 |
55 |
56 |
72 |
73 |
89 |
90 |
91 |
92 |
93 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_home_delivery_liquid_swipe.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
19 |
20 |
29 |
30 |
40 |
41 |
54 |
55 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_menu_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
18 |
19 |
31 |
32 |
33 |
38 |
39 |
46 |
47 |
54 |
55 |
56 |
57 |
58 |
59 |
64 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_place_your_order.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
20 |
21 |
29 |
30 |
46 |
47 |
61 |
62 |
63 |
64 |
65 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_splashscreen.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_xyz.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_delivery.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
26 |
27 |
28 |
46 |
47 |
65 |
66 |
86 |
87 |
108 |
109 |
129 |
130 |
151 |
152 |
170 |
171 |
172 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_hd_page1.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
20 |
21 |
37 |
38 |
51 |
52 |
67 |
68 |
83 |
84 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_hd_page2.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
20 |
21 |
36 |
37 |
50 |
51 |
66 |
67 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_hd_page3.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
20 |
21 |
36 |
37 |
50 |
51 |
66 |
67 |
82 |
83 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_hd_page4.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
19 |
20 |
35 |
36 |
49 |
50 |
65 |
66 |
81 |
82 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_hd_page5.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
20 |
21 |
37 |
38 |
51 |
52 |
67 |
68 |
83 |
84 |
99 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_login_tab.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
16 |
17 |
36 |
37 |
55 |
56 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_qr_code.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
25 |
26 |
42 |
43 |
59 |
60 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_sign_up_tab.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
16 |
17 |
36 |
37 |
55 |
56 |
74 |
75 |
94 |
95 |
96 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_cart_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
18 |
19 |
25 |
26 |
32 |
33 |
38 |
39 |
49 |
50 |
55 |
56 |
62 |
63 |
75 |
76 |
82 |
83 |
84 |
85 |
97 |
98 |
99 |
100 |
106 |
107 |
108 |
109 |
110 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_drink_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
19 |
20 |
25 |
26 |
38 |
39 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/slider_images.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values/refs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Clitz - A Restaurant App
3 |
4 | Hello blank fragment
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/app/src/test/java/com/example/clitz_arestaurantapp/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.example.clitz_arestaurantapp;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | buildscript {
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.0.3'
10 | classpath 'com.google.gms:google-services:4.3.10'
11 |
12 | // NOTE: Do not place your application dependencies here; they belong
13 | // in the individual module build.gradle files
14 | }
15 | }
16 |
17 | allprojects {
18 | repositories {
19 | google()
20 | mavenCentral()
21 | jcenter() // Warning: this repository is going to shut down soon
22 | def githubProperties = new Properties()
23 | githubProperties.load(new FileInputStream(rootProject.file("github.properties")))
24 | repositories {
25 | maven {
26 | name = "GitHubPackages"
27 |
28 | url = uri("https://maven.pkg.github.com/Cuberto/liquid-swipe-android")
29 | credentials {
30 | /** Create github.properties in root project folder file with
31 | ** gpr.usr=GITHUB_USER_ID & gpr.key=PERSONAL_ACCESS_TOKEN
32 | ** Or set env variable GPR_USER & GPR_API_KEY if not adding a properties file**/
33 | username = githubProperties['gpr.usr'] ?: System.getenv("GPR_USER")
34 | password = githubProperties['gpr.key'] ?: System.getenv("GPR_API_KEY")
35 | }
36 | }
37 | }
38 |
39 | maven{
40 | url "https://jitpack.io"
41 | }
42 | }
43 | }
44 |
45 | task clean(type: Delete) {
46 | delete rootProject.buildDir
47 | }
--------------------------------------------------------------------------------
/github.properties:
--------------------------------------------------------------------------------
1 | gpr.usr = 83092294
2 | gpr.key = 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
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | ## For more details on how to configure your build environment visit
2 | # http://www.gradle.org/docs/current/userguide/build_environment.html
3 | #
4 | # Specifies the JVM arguments used for the daemon process.
5 | # The setting is particularly useful for tweaking memory settings.
6 | # Default value: -Xmx1024m -XX:MaxPermSize=256m
7 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
8 | #
9 | # When configured, Gradle will run in incubating parallel mode.
10 | # This option should only be used with decoupled projects. More details, visit
11 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
12 | # org.gradle.parallel=true
13 | #Tue Oct 26 17:48:10 IST 2021
14 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding\=UTF-8
15 | android.useAndroidX=true
16 | android.enableJetifier=true
17 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nihar25z/Food_Delivery_Android_App_AndroidStudio_Firebase/0e7065ce63ece7d2f9e6a049e1a022b4de8a83f3/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Sep 04 00:25:52 IST 2021
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = "Clitz - A Restaurant App"
2 | include ':app'
3 |
--------------------------------------------------------------------------------