Commit c0e9b349 authored by Nina Sanchez's avatar Nina Sanchez

Fixed menu error

Categories work now
(ROS 2)
parent b6b275fb
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry exported="true" kind="lib" path="jackson-annotations-2.2.0.jar"/>
<classpathentry exported="true" kind="lib" path="jackson-core-2.2.0.jar"/>
<classpathentry exported="true" kind="lib" path="jackson-databind-2.2.0.jar"/>
<classpathentry kind="lib" path="libs/bolts-android-1.2.1.jar"/>
<classpathentry kind="lib" path="libs/Parse-1.10.3.jar"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>RestaurantOrderingSystem2</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.source=1.6
<?xml version="1.0" encoding="UTF-8"?>
<manifest android:versionCode="1" android:versionName="1.0"
package="com.cs123grpE.restaurantorderingsystem" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:screenOrientation="landscape" android:theme="@style/AppTheme">
<activity android:label="@string/app_name" android:name=".Login"/>
<activity android:label="@string/title_activity_select_account" android:name=".SelectAccount"/>
<activity android:label="@string/title_activity_register" android:name=".Register"/>
<activity android:label="@string/title_activity_settings" android:name=".Settings"/>
<activity android:label="@string/title_activity_admin" android:name=".Admin"/>
<activity android:label="@string/title_activity_customer" android:name=".Customer"/>
<activity android:label="@string/title_activity_edit_bill" android:name=".EditBill"/>
<activity android:label="@string/title_activity_edit_menu" android:name=".EditMenu"/>
<activity
android:label="@string/title_activity_add_edit_profile" android:name=".AddEditProfile"/>
<activity android:label="@string/title_activity_view_profile" android:name=".ViewProfile"/>
<activity android:label="@string/app_name" android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:label="@string/title_activity_cart" android:name=".Cart"/>
<activity android:label="@string/title_activity_kitchen" android:name=".Kitchen"/>
<!--created by ADT ext plugin at 2015-12-02 23:40:55-->
<activity android:name=".KitchenAdapter"/>
<!--created by ADT ext plugin at 2015-12-02 23:42:23-->
<activity android:name=".OrderModel"/>
</application>
</manifest>
<?xml version="1.0" encoding="UTF-8"?>
<manifest android:versionCode="1" android:versionName="1.0"
package="com.cs123grpE.restaurantorderingsystem" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:screenOrientation="landscape" android:theme="@style/AppTheme">
<activity android:label="@string/app_name" android:name=".Login"/>
<activity android:label="@string/title_activity_select_account" android:name=".SelectAccount"/>
<activity android:label="@string/title_activity_register" android:name=".Register"/>
<activity android:label="@string/title_activity_settings" android:name=".Settings"/>
<activity android:label="@string/title_activity_admin" android:name=".Admin"/>
<activity android:label="@string/title_activity_customer" android:name=".Customer"/>
<activity android:label="@string/title_activity_edit_bill" android:name=".EditBill"/>
<activity android:label="@string/title_activity_edit_menu" android:name=".EditMenu"/>
<activity
android:label="@string/title_activity_add_edit_profile" android:name=".AddEditProfile"/>
<activity android:label="@string/title_activity_view_profile" android:name=".ViewProfile"/>
<activity android:label="@string/app_name" android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:label="@string/title_activity_cart" android:name=".Cart"/>
<activity android:label="@string/title_activity_kitchen" android:name=".Kitchen"/>
<!--created by ADT ext plugin at 2015-12-02 23:40:55-->
<activity android:name=".KitchenAdapter"/>
<!--created by ADT ext plugin at 2015-12-02 23:42:23-->
<activity android:name=".OrderModel"/>
</application>
</manifest>
# cache for current jar dependency. DO NOT EDIT.
# format is <lastModified> <length> <SHA-1> <path>
# Encoding is UTF-8
/** Automatically generated file. DO NOT MODIFY */
package com.cs123grpE.restaurantorderingsystem;
public final class BuildConfig {
public final static boolean DEBUG = true;
}
\ No newline at end of file
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.cs123grpE.restaurantorderingsystem;
public final class R {
public static final class attr {
}
public static final class dimen {
/** Default screen margins, per the Android Design guidelines.
Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).
*/
public static final int activity_horizontal_margin=0x7f040000;
public static final int activity_vertical_margin=0x7f040001;
public static final int button_spacing=0x7f040002;
}
public static final class drawable {
public static final int gear=0x7f020000;
public static final int ic_launcher=0x7f020001;
public static final int noimage=0x7f020002;
public static final int prelimlogo=0x7f020003;
}
public static final class id {
public static final int action_settings=0x7f08003c;
public static final int btnAddMenu=0x7f08001b;
public static final int btnAddToCart=0x7f080038;
public static final int btnAdmin=0x7f08002e;
public static final int btnBack=0x7f080037;
public static final int btnCancel=0x7f08002b;
public static final int btnCart=0x7f080017;
public static final int btnConfigure=0x7f08000b;
public static final int btnConfirm=0x7f08002c;
public static final int btnCustomer=0x7f080030;
public static final int btnDelete=0x7f080019;
public static final int btnDeleteMenu=0x7f08001a;
public static final int btnDone=0x7f080005;
public static final int btnEditBill=0x7f08000a;
public static final int btnEditMenu=0x7f080009;
public static final int btnFinalize=0x7f08000e;
public static final int btnKitchen=0x7f08002f;
public static final int btnLogin=0x7f080022;
public static final int btnLogout=0x7f08000c;
public static final int btnOff=0x7f080011;
public static final int btnOn=0x7f080012;
public static final int btnRegister=0x7f080023;
public static final int btnRevert=0x7f080018;
public static final int btnSave=0x7f080006;
public static final int btnSearch=0x7f080015;
public static final int checkRem=0x7f080021;
public static final int list=0x7f080016;
public static final int listCart=0x7f08000d;
public static final int listKitchen=0x7f08001c;
public static final int listview1=0x7f080013;
public static final int logo=0x7f080007;
public static final int logout=0x7f080031;
public static final int priceName=0x7f080033;
public static final int tableName=0x7f08003a;
public static final int textView00=0x7f080039;
public static final int textView01=0x7f08003b;
public static final int textView1=0x7f08001d;
public static final int textView2=0x7f08001f;
public static final int textView3=0x7f08002d;
public static final int textView4=0x7f080024;
public static final int textView5=0x7f080025;
public static final int textView6=0x7f080027;
public static final int textView7=0x7f080029;
public static final int textView8=0x7f080008;
public static final int textView9=0x7f080010;
public static final int totesPrice=0x7f08000f;
public static final int tvDesc=0x7f080035;
public static final int tvName=0x7f080032;
public static final int tvPrice=0x7f080034;
public static final int tvTags=0x7f080036;
public static final int txtCategory=0x7f080002;
public static final int txtDescription=0x7f080003;
public static final int txtIngredients=0x7f080004;
public static final int txtItemName=0x7f080000;
public static final int txtPass=0x7f080020;
public static final int txtPass2=0x7f08002a;
public static final int txtPrice=0x7f080001;
public static final int txtResto=0x7f080026;
public static final int txtSearch=0x7f080014;
public static final int txtUser=0x7f08001e;
public static final int txtUser2=0x7f080028;
}
public static final class layout {
public static final int activity_add_edit_profile=0x7f030000;
public static final int activity_admin=0x7f030001;
public static final int activity_cart=0x7f030002;
public static final int activity_customer=0x7f030003;
public static final int activity_edit_bill=0x7f030004;
public static final int activity_edit_menu=0x7f030005;
public static final int activity_kitchen=0x7f030006;
public static final int activity_login=0x7f030007;
public static final int activity_main=0x7f030008;
public static final int activity_register=0x7f030009;
public static final int activity_select_account=0x7f03000a;
public static final int activity_settings=0x7f03000b;
public static final int activity_view_profile=0x7f03000c;
public static final int group=0x7f03000d;
public static final int menu_item=0x7f03000e;
public static final int row=0x7f03000f;
}
public static final class menu {
public static final int add_edit_profile=0x7f070000;
public static final int admin=0x7f070001;
public static final int cart=0x7f070002;
public static final int customer=0x7f070003;
public static final int edit_bill=0x7f070004;
public static final int edit_menu=0x7f070005;
public static final int kitchen=0x7f070006;
public static final int login=0x7f070007;
public static final int main=0x7f070008;
public static final int register=0x7f070009;
public static final int select_account=0x7f07000a;
public static final int settings=0x7f07000b;
public static final int view_profile=0x7f07000c;
}
public static final class string {
public static final int action_settings=0x7f050001;
public static final int app_name=0x7f050000;
public static final int hello_world=0x7f050008;
public static final int logout=0x7f050006;
public static final int title_activity_add_edit_profile=0x7f05000b;
public static final int title_activity_admin=0x7f050005;
public static final int title_activity_cart=0x7f05000e;
public static final int title_activity_customer=0x7f050007;
public static final int title_activity_edit_bill=0x7f050009;
public static final int title_activity_edit_menu=0x7f05000a;
public static final int title_activity_kitchen=0x7f05000f;
public static final int title_activity_main=0x7f05000d;
public static final int title_activity_register=0x7f050003;
public static final int title_activity_select_account=0x7f050002;
public static final int title_activity_settings=0x7f050004;
public static final int title_activity_view_profile=0x7f05000c;
}
public static final class style {
/**
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
API 11 theme customizations can go here.
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
API 14 theme customizations can go here.
*/
public static final int AppBaseTheme=0x7f060000;
/** Application theme.
All customizations that are NOT specific to a particular API-level can go here.
*/
public static final int AppTheme=0x7f060001;
}
}
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-19
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:orientation="vertical"
android:gravity="center"
tools:context="com.cs123grpE.restaurantorderingsystem.AddEditProfile" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/noimage"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:onClick="changeImage" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Name:"
android:ems="3"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/txtItemName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="text" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Price:"
android:ems="3"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/txtPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Category: "
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/txtCategory"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginBottom="@dimen/activity_vertical_margin" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Description:"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/txtDescription"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ems="19"
android:inputType="textMultiLine" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tags:"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/txtIngredients"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="textMultiLine" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center" >
<Button
android:id="@+id/btnDone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Cancel"
android:layout_marginRight="@dimen/button_spacing"
android:onClick="cancel" />
<Button
android:id="@+id/btnSave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Save"
android:layout_marginLeft="@dimen/button_spacing"
android:onClick="save" />
</LinearLayout>
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:orientation="vertical"
android:gravity="center"
tools:context="com.cs123grpE.restaurantorderingsystem.Admin" >
<ImageView
android:id="@+id/logo"
android:src="@drawable/prelimlogo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin" />
<TextView
android:id="@+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Admin"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_marginBottom="@dimen/activity_vertical_margin" />
<Button
android:id="@+id/btnEditMenu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:text="Edit Menu"
android:onClick="editMenu" />
<Button
android:id="@+id/btnEditBill"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:text="Edit Bill"
android:onClick="editBill"
android:layout_marginBottom="@dimen/activity_vertical_margin" />
<Button
android:id="@+id/btnConfigure"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:text="Configure"
android:onClick="config"
android:layout_marginBottom="@dimen/activity_vertical_margin" />
<Button
android:id="@+id/btnLogout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:text="@string/logout"
android:onClick="logoff" />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:orientation="vertical"
tools:context="com.cs123grpE.restaurantorderingsystem.Cart" >
<ListView
android:id="@+id/listCart"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight="1" ></ListView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right" >
<Button
android:id="@+id/btnFinalize"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Finalize"
android:onClick="finalize"
android:layout_marginRight="@dimen/activity_horizontal_margin" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Total: "
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_marginRight="@dimen/activity_vertical_margin" >
</TextView>
<TextView
android:id="@+id/totesPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0.00"
android:ems="3"
android:gravity="right"
android:textAppearance="?android:attr/textAppearanceLarge" ></TextView>
</LinearLayout>
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.cs123grpE.restaurantorderingsystem.Customer" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginRight="@dimen/activity_vertical_margin"
android:orientation="vertical"
android:gravity="center_horizontal" >
<TextView
android:id="@+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="12"
android:text="Allergy Filter"
android:textAppearance="?android:attr/textAppearanceMedium"
android:gravity="center_horizontal" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:id="@+id/btnOff"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="4"
android:text="Off"
android:onClick="filterOff" />
<Button
android:id="@+id/btnOn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="4"
android:text="On"
android:onClick="filterOn" />
</LinearLayout>
<ListView
android:id="@+id/listview1"
android:layout_width="fill_parent"
android:layout_height="match_parent" >"
</ListView>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_horizontal" >
<EditText
android:id="@+id/txtSearch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="25" />
<Button
android:id="@+id/btnSearch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Search"
android:onClick="search" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:layout_weight="1" >
<ExpandableListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:groupIndicator="@null" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right" >
<Button
android:id="@+id/btnCart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="View Cart"
android:onClick="viewCart" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.cs123grpE.restaurantorderingsystem.EditBill" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_marginRight="@dimen/activity_vertical_margin" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tables"
android:ems="12"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceLarge" />
<ListView
android:layout_width="match_parent"
android:layout_height="fill_parent" >
</ListView>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Bill"
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="center" />
<ListView
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight="1" >
</ListView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal" >
<Button
android:id="@+id/btnRevert"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Revert Changes"
android:layout_marginRight="@dimen/activity_horizontal_margin" />
<Button
android:id="@+id/btnDelete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:text="Delete Selected" />
<Button
android:id="@+id/btnSave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Save Changes" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:orientation="vertical"
tools:context="com.cs123grpE.restaurantorderingsystem.EditMenu" >
<ExpandableListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:groupIndicator="@null" >
</ExpandableListView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal" >
<Button
android:id="@+id/btnDeleteMenu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Delete Menu Item"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:onClick="deleteMenu" />
<Button
android:id="@+id/btnAddMenu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Add Menu Item"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:onClick="addMenu" />
</LinearLayout>
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.cs123grpE.restaurantorderingsystem.Kitchen" >
<ListView
android:id="@+id/listKitchen"
android:layout_width="match_parent"
android:layout_height="match_parent" ></ListView>
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:orientation="vertical"
android:gravity="center"
tools:context="com.cs123grpE.restaurantorderingsystem.Login" >
<ImageView
android:id="@+id/logo"
android:src="@drawable/prelimlogo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Username: "
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/txtUser"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="15"
android:inputType="text" >
<requestFocus android:layout_width="wrap_content" />
</EditText>
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Password: "
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/txtPass"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="15"
android:inputType="textPassword" >
<requestFocus />
</EditText>
<CheckBox
android:id="@+id/checkRem"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Remember Me" />
<Button
android:id="@+id/btnLogin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Log In"
android:onClick="logon"
android:layout_marginBottom="@dimen/activity_vertical_margin" />
<Button
android:id="@+id/btnRegister"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Register"
android:onClick="register" />
</LinearLayout>
\ No newline at end of file
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.cs123grpE.restaurantorderingsystem.MainActivity" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />
</RelativeLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:orientation="vertical"
android:gravity="center"
tools:context="com.cs123grpE.restaurantorderingsystem.Register" >
<ImageView
android:id="@+id/logo"
android:src="@drawable/prelimlogo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Register"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Restaurant Name"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/txtResto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="15"
android:inputType="text" >
<requestFocus />
</EditText>
<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Username"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/txtUser2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="15"
android:inputType="text" >
<requestFocus />
</EditText>
<TextView
android:id="@+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Password"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/txtPass2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="15"
android:inputType="textPassword" >
<requestFocus />
</EditText>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:id="@+id/btnCancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Cancel"
android:onClick="sayNo"
android:layout_marginRight="@dimen/button_spacing" />
<Button
android:id="@+id/btnConfirm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Confirm"
android:onClick="sayYes"
android:layout_marginLeft="@dimen/button_spacing" />
</LinearLayout>
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:orientation="vertical"
android:gravity="center"
tools:context="com.cs123grpE.restaurantorderingsystem.SelectAccount" >
<ImageView
android:id="@+id/logo"
android:src="@drawable/prelimlogo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Select Account"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_marginBottom="@dimen/activity_vertical_margin" />"
<Button
android:id="@+id/btnAdmin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Admin"
android:ems="8"
android:onClick="toAdmin" />
<Button
android:id="@+id/btnKitchen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Kitchen"
android:ems="8"
android:onClick="toKitchen" />
<Button
android:id="@+id/btnCustomer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Customer"
android:ems="8"
android:onClick="toCustomer"
android:layout_marginBottom="@dimen/activity_vertical_margin" />
<Button
android:id="@+id/logout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Logout"
android:onClick="logoff" />
</LinearLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.cs123grpE.restaurantorderingsystem.Settings" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This is the settings page." />
</RelativeLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:orientation="vertical"
android:gravity="center"
tools:context="com.cs123grpE.restaurantorderingsystem.ViewProfile" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/noimage"
android:layout_marginRight="@dimen/activity_horizontal_margin" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center_vertical" >
<TextView
android:id="@+id/tvName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="11"
android:textAppearance="?android:attr/textAppearanceLarge"
android:scrollHorizontally="false"
android:text="Item Name" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/priceName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Price:"
android:ems="3"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/tvPrice"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginBottom="@dimen/activity_vertical_margin" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Description:"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/tvDesc"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ems="19"
android:scrollHorizontally="false"
android:text="Lorem ipsum dolor Lorem ipsum dolor Lorem ipsum dolor"
android:textAppearance="?android:attr/textAppearanceMedium"
android:paddingLeft="@dimen/activity_vertical_margin" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tags:"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/tvTags"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ems="19"
android:scrollHorizontally="false"
android:text="Lorem ipsum dolor Lorem ipsum dolor Lorem ipsum dolor Lorem ipsum dolor"
android:textAppearance="?android:attr/textAppearanceMedium"
android:paddingLeft="@dimen/activity_vertical_margin" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center" >
<Button
android:id="@+id/btnBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Back"
android:layout_marginRight="@dimen/button_spacing"
android:onClick="back" />
<Button
android:id="@+id/btnAddToCart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Add to Cart"
android:layout_marginLeft="@dimen/button_spacing"
android:onClick="addToCart" />
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:clickable="true"
android:paddingLeft="@dimen/activity_vertical_margin"
tools:context="com.cs123grpE.restaurantorderingsystem.Customer" >
<TextView
android:id="@+id/textView00"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textIsSelectable="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Large Text"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/tableName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:clickable="true"
android:paddingLeft="@dimen/activity_horizontal_margin"
tools:context="com.cs123grpE.restaurantorderingsystem.Customer" >
<CheckedTextView
android:id="@+id/textView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textIsSelectable="true"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.cs123grpE.restaurantorderingsystem.AddEditProfile" >
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>
</menu>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.cs123grpE.restaurantorderingsystem.Admin" >
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>
</menu>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.cs123grpE.restaurantorderingsystem.Cart" >
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>
</menu>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.cs123grpE.restaurantorderingsystem.Customer" >
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>
</menu>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.cs123grpE.restaurantorderingsystem.EditBill" >
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>
</menu>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.cs123grpE.restaurantorderingsystem.EditMenu" >
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>
</menu>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.cs123grpE.restaurantorderingsystem.Kitchen" >
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>
</menu>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.cs123grpE.restaurantorderingsystem.Login" >
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>
</menu>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.cs123grpE.restaurantorderingsystem.MainActivity" >
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>
</menu>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.cs123grpE.restaurantorderingsystem.Register" >
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>
</menu>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.cs123grpE.restaurantorderingsystem.SelectAccount" >
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>
</menu>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.cs123grpE.restaurantorderingsystem.Settings" >
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>
</menu>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.cs123grpE.restaurantorderingsystem.ViewProfile" >
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>
</menu>
<resources>
<!--
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<!-- API 11 theme customizations can go here. -->
</style>
</resources>
<resources>
<!--
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- API 14 theme customizations can go here. -->
</style>
</resources>
<resources>
<!--
Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).
-->
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="button_spacing">50dp</dimen>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Restaurant Ordering System</string>
<string name="action_settings">Settings</string>
<string name="title_activity_select_account">Select Account</string>
<string name="title_activity_register">Register</string>
<string name="title_activity_settings">Settings</string>
<string name="title_activity_admin">Admin</string>
<string name="logout">Logout</string>
<string name="title_activity_customer">Customer</string>
<string name="hello_world">Hello world!</string>
<string name="title_activity_edit_bill">Edit Bill</string>
<string name="title_activity_edit_menu">Edit Menu</string>
<string name="title_activity_add_edit_profile">Add/Edit Profile</string>
<string name="title_activity_view_profile">View Item Profile</string>
<string name="title_activity_main">MainActivity</string>
<string name="title_activity_cart">Cart</string>
<string name="title_activity_kitchen">Kitchen</string>
</resources>
<resources>
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
</resources>
package com.cs123grpE.restaurantorderingsystem;
import android.app.Activity;
import android.content.Intent;
import java.util.List;
import com.parse.*;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;
public class AddEditProfile extends Activity {
private String mode;
private ParseObject obj;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_edit_profile);
Intent i = getIntent();
mode = i.getStringExtra("mode");
if(mode.equals("Edit")) {
String name = i.getStringExtra("object");
obj = Helper.findObject("Menu_Item", "item_name", name);
fillInText();
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.add_edit_profile, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
public void changeImage (View v) {
// open explorer to select picture to replace default
Toast.makeText (this, "Image has been changed.", Toast.LENGTH_SHORT).show();
}
public void cancel (View v) {
finish();
}
public void fillInText() {
EditText nm = (EditText) findViewById (R.id.txtItemName);
nm.setText((String) obj.get("item_name"));
EditText price = (EditText) findViewById (R.id.txtPrice);
price.setText(""+ obj.getDouble("item_price"));
EditText des = (EditText) findViewById (R.id.txtDescription);
des.setText((String) obj.get("item_desc"));
EditText tag = (EditText) findViewById (R.id.txtIngredients);
EditText cat = (EditText) findViewById (R.id.txtCategory);
cat.setText( (String) ( (ParseObject) obj.get("category") ).get("category_name") );
}
public void save (View v) {
// do stuff to save fields
EditText nm = (EditText) findViewById (R.id.txtItemName);
EditText price = (EditText) findViewById (R.id.txtPrice);
EditText des = (EditText) findViewById (R.id.txtDescription);
EditText tag = (EditText) findViewById (R.id.txtIngredients);
EditText cat = (EditText) findViewById (R.id.txtCategory);
if(mode.equals("Add")) {
Helper.addMenuItem(nm.getText().toString(), Double.parseDouble(price.getText().toString()),
des.getText().toString(), tag.getText().toString(), cat.getText().toString());
Toast.makeText (this, "Item is added to menu.", Toast.LENGTH_SHORT).show();
finish();
}
else {
Helper.editMenuItem(obj, nm.getText().toString(), Double.parseDouble(price.getText().toString()),
des.getText().toString(), tag.getText().toString(), cat.getText().toString());
Toast.makeText (this, "Item is edited.", Toast.LENGTH_SHORT).show();
finish();
}
}
public void onBackPressed() {
// go back to the menu
finish();
}
}
package com.cs123grpE.restaurantorderingsystem;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;
public class Admin extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_admin);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.admin, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
public void editMenu (View v) {
// go to edit menu screen
Intent i = new Intent (this, EditMenu.class);
startActivity(i);
}
public void editBill (View v) {
// go to edit bill screen
Intent i = new Intent (this, EditBill.class);
startActivity(i);
}
public void config (View v) {
// go to settings screen
Intent i = new Intent (this, Settings.class);
startActivity(i);
}
public void logoff (View v) {
Intent i = new Intent (this, Login.class);
startActivity(i);
finish();
}
public void onBackPressed() {
finish();
}
}
package com.cs123grpE.restaurantorderingsystem;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;
public class Cart extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_cart);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.cart, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
public void finalize (View v) {
// Send cart contents to kitchen and clear
Toast.makeText(this, "Orders finalized.", Toast.LENGTH_SHORT).show();
}
}
package com.cs123grpE.restaurantorderingsystem;
import java.util.ArrayList;
import java.util.List;
import java.util.HashMap;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ExpandableListView;
import android.widget.ListView;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ListAdapter;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.widget.ExpandableListView.OnChildClickListener;
import android.widget.ExpandableListView.OnGroupClickListener;
import android.widget.ExpandableListView.OnGroupCollapseListener;
import android.widget.ExpandableListView.OnGroupExpandListener;
import android.widget.Toast;
import com.parse.*;
public class Customer extends Activity {
String [] menu = {"Fish", "Meat", "Soup", "Fruit", "Vegetables"};
private ExpandableAdapter epa;
private ExpandableListView exp;
List<String> listDataHeader;
List<String> listDataHeaderId;
HashMap<String, List<String>> listDataChild;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_customer);
generateMenu("", true);
ListView lv = (ListView)findViewById(R.id.listview1);
lv.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, menu));
exp.setOnGroupClickListener(new OnGroupClickListener() {
@Override
public boolean onGroupClick(ExpandableListView parent, View v,
int groupPosition, long id) {
// Toast.makeText(getApplicationContext(),
// "Group Clicked " + listDataHeader.get(groupPosition),
// Toast.LENGTH_SHORT).show();
return false;
}
});
// Listview Group expanded listener
exp.setOnGroupExpandListener(new OnGroupExpandListener() {
@Override
public void onGroupExpand(int groupPosition) {
Toast.makeText(getApplicationContext(),
listDataHeader.get(groupPosition) + " Expanded",
Toast.LENGTH_SHORT).show();
}
});
// Listview Group collasped listener
exp.setOnGroupCollapseListener(new OnGroupCollapseListener() {
@Override
public void onGroupCollapse(int groupPosition) {
Toast.makeText(getApplicationContext(),
listDataHeader.get(groupPosition) + " Collapsed",
Toast.LENGTH_SHORT).show();
}
});
// Listview on child click listener
exp.setOnChildClickListener(new OnChildClickListener() {
@Override
public boolean onChildClick(ExpandableListView parent, View v,
int groupPosition, int childPosition, long id) {
// TODO Auto-generated method stub
String name = listDataChild.get(listDataHeader.get(groupPosition))
.get(childPosition);
ParseObject x = null;
ParseObject order = null;
double price = 0;
try {
x = (new ParseQuery("Menu_Item")).whereMatches("item_name", name).getFirst();
price = x.getDouble("item_price");
order = new ParseObject("Order");
order.put("item_id", x.getObjectId());
order.put("quantity", 1);
order.saveInBackground();
Intent i = new Intent(getApplicationContext(), ViewProfile.class);
i.putExtra("menu_name", name);
startActivity(i);
}catch(Exception e) {}
Toast.makeText(
getApplicationContext(),
listDataHeader.get(groupPosition) + " : " +
listDataChild.get(listDataHeader.get(groupPosition))
.get(childPosition) + " price: " + price, Toast.LENGTH_SHORT
).show();
return false;
}
});
//expList.setOnChildClickListener(this);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.customer, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
public void onBackPressed() {
// do nothing
}
public void filterOff (View v) {
// toggle to filter items without specified item from item list
EditText searchString = (EditText) findViewById (R.id.txtSearch);
String criteria = searchString.getText().toString().trim();
generateMenu(criteria, false);
}
public void filterOn (View v) {
// toggle to filter items with specified item from item list
EditText searchString = (EditText) findViewById (R.id.txtSearch);
String criteria = searchString.getText().toString().trim();
generateMenu(criteria, true);
}
public void search (View v) {
// search for query in menu name or description
EditText searchString = (EditText) findViewById (R.id.txtSearch);
String criteria = searchString.getText().toString().trim();
}
public void viewCart (View v) {
// go to cart screen
Intent i = new Intent (this, Cart.class);
startActivity (i);
}
public void generateMenu(String with, boolean in) {
listDataHeader = new ArrayList<String>();
listDataHeaderId = new ArrayList<String>();
listDataChild = new HashMap<String, List<String>>();
getHeaders(with, in);
getChildren();
exp = (ExpandableListView)findViewById(R.id.list);
//prepareListData();
epa = new ExpandableAdapter(this, listDataHeader, listDataChild);
exp.setAdapter(epa);
}
public void getHeaders(String with, boolean in) {
ParseQuery<ParseObject> pq = new ParseQuery("Ingredient");
List<ParseObject> l = null;
try{
l = pq.find();
} catch(Exception e) {}
for(ParseObject po: l) {
String name = (String) po.get("ingredient_name");
if(!with.equals("")) {
if(in && name.equals("with")) {
listDataHeader.add(name);
listDataHeaderId.add(po.getObjectId());
listDataChild.put(name, new ArrayList<String>());
}
else {
if(name.equals("with")) continue;
listDataHeader.add(name);
listDataHeaderId.add(po.getObjectId());
listDataChild.put(name, new ArrayList<String>());
}
}
else {
listDataHeader.add(name);
listDataHeaderId.add(po.getObjectId());
listDataChild.put(name, new ArrayList<String>());
}
}
}
public void getChildren() {
ParseQuery<ParseObject> pq = new ParseQuery<ParseObject>("Menu_Item");
List<String> tempFood = new ArrayList<String>();
List<ParseObject> list = null;
try {
list = pq.find();
} catch(Exception e) {}
for(ParseObject po: list) {
String name = (String)po.get("item_name");
String ingr = (String)po.get("ingredient_name");
if(listDataHeader.contains(ingr))
listDataChild.get(ingr).add(name);
}
}
private void prepareListData() {
listDataHeader = new ArrayList<String>();
// Adding child data
listDataHeader.add("MEAT");
listDataHeader.add("SOUP");
listDataHeader.add("FISH");
// Adding child data
List<String> top250 = new ArrayList<String>();
top250.add("CRISPY PATA");
top250.add("ADUBA");
top250.add("PATAATIM");
top250.add("SINIGANG");
List<String> nowShowing = new ArrayList<String>();
nowShowing.add("CHICKEN NOODLE SOUP");
nowShowing.add("SINIGANG SA MISO");
nowShowing.add("SPINACH");
nowShowing.add("BIRD'S NEST");
List<String> comingSoon = new ArrayList<String>();
comingSoon.add("TALAKITOK");
comingSoon.add("PAKSIW");
comingSoon.add("ESCABECHE");
listDataChild.put(listDataHeader.get(0), top250); // Header, Child data
listDataChild.put(listDataHeader.get(1), nowShowing);
listDataChild.put(listDataHeader.get(2), comingSoon);
}
}
package com.cs123grpE.restaurantorderingsystem;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
public class EditBill extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_edit_bill);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.edit_bill, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
package com.cs123grpE.restaurantorderingsystem;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;
import android.widget.ExpandableListView;
import android.widget.ExpandableListView.OnChildClickListener;
import android.widget.ExpandableListView.OnGroupClickListener;
import android.widget.ExpandableListView.OnGroupCollapseListener;
import android.widget.ExpandableListView.OnGroupExpandListener;
import com.parse.*;
public class EditMenu extends Activity {
private ExpandableAdapter epa;
private ExpandableListView exp;
List<String> listDataHeader;
HashMap<String, List<String>> listDataChild;
HashMap<String, List<ParseObject>> listDataChildObject;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_edit_menu);
prepareLists();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.edit_menu, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
public void addMenu (View v) {
// add a MenuListItem
Intent i = new Intent (this, AddEditProfile.class);
i.putExtra("mode","Add");
startActivityForResult(i, 1);
}
public void editMenu (String cat, int childPos) {
String po = listDataChild.get(cat).get(childPos);
Intent i = new Intent (this, AddEditProfile.class);
i.putExtra("mode","Edit");
i.putExtra("object", po);
startActivityForResult(i, 1);
}
public void deleteMenu (View v) {
// show dialog for confirmation
Toast.makeText(this, "You will delete a Menu Item.", Toast.LENGTH_SHORT).show();
}
private void prepareLists() {
prepareListData();
exp = (ExpandableListView)findViewById(R.id.list);
epa = new ExpandableAdapter(this, listDataHeader, listDataChild);
exp.setAdapter(epa);
exp.setOnGroupClickListener(new OnGroupClickListener() {
@Override
public boolean onGroupClick(ExpandableListView parent, View v,
int groupPosition, long id) {
// Toast.makeText(getApplicationContext(),
// "Group Clicked " + listDataHeader.get(groupPosition),
// Toast.LENGTH_SHORT).show();
return false;
}
});
// Listview Group expanded listener
exp.setOnGroupExpandListener(new OnGroupExpandListener() {
@Override
public void onGroupExpand(int groupPosition) {
Toast.makeText(getApplicationContext(),
listDataHeader.get(groupPosition) + " Expanded",
Toast.LENGTH_SHORT).show();
}
});
// Listview Group collasped listener
exp.setOnGroupCollapseListener(new OnGroupCollapseListener() {
@Override
public void onGroupCollapse(int groupPosition) {
Toast.makeText(getApplicationContext(),
listDataHeader.get(groupPosition) + " Collapsed",
Toast.LENGTH_SHORT).show();
}
});
// Listview on child click listener
exp.setOnChildClickListener(new OnChildClickListener() {
@Override
public boolean onChildClick(ExpandableListView parent, View v,
int groupPosition, int childPosition, long id) {
// TODO Auto-generated method stub
editMenu(listDataHeader.get(groupPosition), childPosition);
Toast.makeText(getApplicationContext(),
listDataHeader.get(groupPosition)
+ " : "
+ listDataChild.get(listDataHeader.get(groupPosition)).get(childPosition), Toast.LENGTH_SHORT)
.show();
return false;
}
});
}
private void prepareListData() {
listDataHeader = new ArrayList<String>();
listDataChild = new HashMap<String, List<String>>();
listDataChildObject = new HashMap<String, List<ParseObject>>();
// Adding child data
ParseQuery<ParseObject> query1 = ParseQuery.getQuery("Category");
List<ParseObject> listHeaders = null;
try {
listHeaders = query1.find();
} catch(Exception e) {}
for(ParseObject x: listHeaders) {
listDataHeader.add((String)x.get("category_name"));
}
int n = listDataHeader.size();
// Adding child data
for(int i = 0; i < n; i++) {
String s = listDataHeader.get(i);
ParseObject obj = listHeaders.get(i);
List<String> list = new ArrayList<String>();
List<ParseObject> listObject = new ArrayList<ParseObject>();
ParseQuery<ParseObject> query = ParseQuery.getQuery("Menu_Item").whereEqualTo("category", obj);
List<ParseObject> matches = null;
try {
matches = query.find();
} catch(Exception e) {}
for(ParseObject a: matches) {
// if(isActive(a)) {
list.add((String) a.get("item_name"));
listObject.add(a);
// }
}
listDataChild.put(s, list);
listDataChildObject.put(s, listObject);
}
}
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, getIntent());
if(resultCode==RESULT_OK && requestCode==1){
System.out.println("RESULT :D");
}
prepareLists();
}
/*private void prepareListData() {
listDataHeader = new ArrayList<String>();
listDataChild = new HashMap<String, List<String>>();
// Adding child data
listDataHeader.add("MEAT");
listDataHeader.add("SOUP");
listDataHeader.add("FISH");
// Adding child data
List<String> top250 = new ArrayList<String>();
top250.add("CRISPY PATA");
top250.add("ADUBA");
top250.add("PATAATIM");
top250.add("SINIGANG");
List<String> nowShowing = new ArrayList<String>();
nowShowing.add("CHICKEN NOODLE SOUP");
nowShowing.add("SINIGANG SA MISO");
nowShowing.add("SPINACH");
nowShowing.add("BIRD'S NEST");
List<String> comingSoon = new ArrayList<String>();
comingSoon.add("TALAKITOK");
comingSoon.add("PAKSIW");
comingSoon.add("ESCABECHE");
listDataChild.put(listDataHeader.get(0), top250); // Header, Child data
listDataChild.put(listDataHeader.get(1), nowShowing);
listDataChild.put(listDataHeader.get(2), comingSoon);
}*/
}
package com.cs123grpE.restaurantorderingsystem;
import java.util.HashMap;
import java.util.List;
import android.content.Context;
import android.graphics.Typeface;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseExpandableListAdapter;
import android.widget.TextView;
public class ExpandableAdapter extends BaseExpandableListAdapter {
private Context _context;
private List<String> _listDataHeader; // header titles
// child data in format of header title, child title
private HashMap<String, List<String>> _listDataChild;
public ExpandableAdapter(Context context, List<String> listDataHeader,
HashMap<String, List<String>> listChildData) {
this._context = context;
this._listDataHeader = listDataHeader;
this._listDataChild = listChildData;
}
@Override
public Object getChild(int groupPosition, int childPosititon) {
return this._listDataChild.get(this._listDataHeader.get(groupPosition))
.get(childPosititon);
}
@Override
public long getChildId(int groupPosition, int childPosition) {
return childPosition;
}
@Override
public View getChildView(int groupPosition, final int childPosition,
boolean isLastChild, View convertView, ViewGroup parent) {
final String childText = (String) getChild(groupPosition, childPosition);
if (convertView == null) {
LayoutInflater infalInflater = (LayoutInflater) this._context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = infalInflater.inflate(R.layout.menu_item, null);
}
TextView txtListChild = (TextView) convertView
.findViewById(R.id.textView1);
txtListChild.setText(childText);
return convertView;
}
@Override
public int getChildrenCount(int groupPosition) {
return this._listDataChild.get(this._listDataHeader.get(groupPosition))
.size();
}
@Override
public Object getGroup(int groupPosition) {
return this._listDataHeader.get(groupPosition);
}
@Override
public int getGroupCount() {
return this._listDataHeader.size();
}
@Override
public long getGroupId(int groupPosition) {
return groupPosition;
}
@Override
public View getGroupView(int groupPosition, boolean isExpanded,
View convertView, ViewGroup parent) {
String headerTitle = (String) getGroup(groupPosition);
if (convertView == null) {
LayoutInflater infalInflater = (LayoutInflater) this._context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = infalInflater.inflate(R.layout.menu_item, null);
}
TextView lblListHeader = (TextView) convertView
.findViewById(R.id.textView1);
lblListHeader.setTypeface(null, Typeface.BOLD);
lblListHeader.setText(headerTitle);
return convertView;
}
@Override
public boolean hasStableIds() {
return false;
}
@Override
public boolean isChildSelectable(int groupPosition, int childPosition) {
return true;
}
}
package com.cs123grpE.restaurantorderingsystem;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;
import android.widget.ExpandableListView;
import android.widget.ExpandableListView.OnChildClickListener;
import android.widget.ExpandableListView.OnGroupClickListener;
import android.widget.ExpandableListView.OnGroupCollapseListener;
import android.widget.ExpandableListView.OnGroupExpandListener;
import com.parse.*;
import java.util.*;
public class Helper {
public static boolean isActive(ParseObject p) {
// Date currDate = Calendar.getInstance().getTime();
// Date activeFrom = (Date) p.get("active_from");
// Date activeUntil = (Date) p.get("active_from");
return p.getBoolean("active");
}
public static ParseObject findObject(String className, String key, String itemName) {
ParseQuery<ParseObject> query = ParseQuery.getQuery(className).whereMatches(key, itemName);
List<ParseObject> list = null;
try {
list = query.find();
} catch(Exception e) {
return null;
}
for(ParseObject a: list) {
if(className.equals("Menu_Item") && isActive(a)) return a;
if(className.equals("Category")) return a;
}
return null;
}
public static void addMenuItem(String name, double price, String desc, String tag, String cat) {
ParseObject item = new ParseObject("Menu_Item");
item.put("item_name", name);
item.put("item_price", price);
item.put("item_desc", desc);
item.put("active", true);
ParseObject obj = findObject("Category", "category_name", cat);
if(obj==null) obj = addCategory(cat);
item.put("category", obj);
item.saveInBackground();
}
public static void editMenuItem(ParseObject item, String name, double price, String desc, String tag, String cat) {
item.put("item_name", name);
item.put("item_price", price);
item.put("item_desc", desc);
item.put("active", true);
ParseObject obj = findObject("Category", "category_name", cat);
if(obj==null) obj = addCategory(cat);
item.put("category", obj);
item.saveInBackground();
}
public static ParseObject addCategory(String cat) {
ParseObject p = new ParseObject("Category");
p.put("category_name", cat);
p.saveInBackground();
return p;
}
}
package com.cs123grpE.restaurantorderingsystem;
import java.util.ArrayList;
import android.app.Activity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.ListView;
import android.widget.Toast;
public class Kitchen extends Activity {
ListView lv;
KitchenAdapter adapter;
public Kitchen CustomListView = null;
public ArrayList<OrderModel> CustomListViewValuesArr = new ArrayList<OrderModel>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_kitchen);
CustomListView = this;
/******** Take some data in Arraylist ( CustomListViewValuesArr ) ***********/
setListData();
Resources res =getResources();
lv= ( ListView )findViewById( R.id.list ); // List defined in XML ( See Below )
/**************** Create Custom Adapter *********/
adapter=new KitchenAdapter( CustomListView, CustomListViewValuesArr,res );
lv.setAdapter( adapter );
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.kitchen, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
public void onBackPressed() {
Intent i = new Intent (this, SelectAccount.class);
startActivity(i);
}
public void setListData()
{
for (int i = 0; i < 11; i++) {
final OrderModel sched = new OrderModel();
/******* Firstly take data in model object ******/
sched.setFoodName(""+i);
sched.setTableNumber("Table Number: "+i);
/******** Take Model Object in ArrayList **********/
CustomListViewValuesArr.add( sched );
}
}
public void onItemClick(int mPosition)
{
CustomListViewValuesArr.remove(mPosition);
adapter.notifyDataSetChanged();
}
}
\ No newline at end of file
package com.cs123grpE.restaurantorderingsystem;
import java.util.ArrayList;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.res.Resources;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
public class KitchenAdapter extends BaseAdapter implements OnClickListener{
private Activity activity;
private ArrayList data;
private static LayoutInflater inflater=null;
public Resources res;
OrderModel tempValues=null;
int i=0;
public KitchenAdapter(Activity a, ArrayList d,Resources resLocal) {
/********** Take passed values **********/
activity = a;
data=d;
res = resLocal;
/*********** Layout inflator to call external xml layout () ***********/
inflater = ( LayoutInflater )activity.
getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
@Override
public int getCount() {
if(data.size()<=0)
return 1;
return data.size();
}
@Override
public Object getItem(int position) {
// TODO Auto-generated method stub
return position;
}
@Override
public long getItemId(int position) {
// TODO Auto-generated method stub
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View vi = convertView;
ViewHolder holder;
if(convertView==null){
/****** Inflate tabitem.xml file for each row ( Defined below ) *******/
vi = inflater.inflate(R.layout.menu_item, null);
/****** View Holder Object to contain tabitem.xml file elements ******/
holder = new ViewHolder();
holder.text = (TextView) vi.findViewById(R.id.textView1);
holder.text1=(TextView)vi.findViewById(R.id.tableName);
/************ Set holder with LayoutInflater ************/
vi.setTag( holder );
}
else
holder=(ViewHolder)vi.getTag();
if(data.size()<=0)
{
holder.text.setText("No Data");
}
else
{
/***** Get each Model object from Arraylist ********/
tempValues=null;
tempValues = ( OrderModel ) data.get( position );
/************ Set Model values in Holder elements ***********/
holder.text.setText( tempValues.getFoodName() );
holder.text1.setText( tempValues.getTableNumber() );
/******** Set Item Click Listner for LayoutInflater for each row *******/
vi.setOnClickListener((android.view.View.OnClickListener) new OnItemClickListener( position ));
}
return vi;
}
@Override
public void onClick(DialogInterface arg0, int arg1) {
}
public void onClick(View v) {
}
public static class ViewHolder{
public TextView text;
public TextView text1;
}
private class OnItemClickListener implements OnClickListener{
private int mPosition;
OnItemClickListener(int position){
mPosition = position;
}
public void onClick(View v) {
Kitchen sct = (Kitchen)activity;
/**** Call onItemClick Method inside CustomListViewAndroidExample Class ( See Below )****/
sct.onItemClick(mPosition);
}
public void onClick(DialogInterface arg0, int arg1) {
// TODO Auto-generated method stub
}
}
}
\ No newline at end of file
package com.cs123grpE.restaurantorderingsystem;
import java.util.ArrayList;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import android.app.Activity;
import android.os.Bundle;
import android.view.*;
import android.widget.*;
import android.content.*;
import com.parse.*;
public class Login extends Activity {
SharedPreferences list;
ArrayList<User> array;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
/*
ParseObject crispyPata = new ParseObject("Menu_Item");
crispyPata.put("item_name", "Crispy Pata");
crispyPata.put("item_price", 100.00);
crispyPata.saveInBackground();
ParseObject aduba = new ParseObject("Menu_Item");
aduba.put("item_name", "Aduba");
aduba.put("item_price", 103.00);
aduba.saveInBackground();
ParseObject pataatim = new ParseObject("Menu_Item");
pataatim.put("item_name", "Pataatim");
pataatim.put("item_price", 102.00);
pataatim.saveInBackground();
ParseObject sinigang = new ParseObject("Menu_Item");
sinigang.put("item_name", "Sinigang");
sinigang.put("item_price", 101.00);
sinigang.saveInBackground();
ParseObject cns = new ParseObject("Menu_Item");
cns.put("item_name", "Chicken Noodle Soup");
cns.put("item_price", 40.00);
cns.saveInBackground();
ParseObject birdsnest = new ParseObject("Menu_Item");
birdsnest.put("item_name", "Bird's Nest Soup");
birdsnest.put("item_price", 40.00);
birdsnest.saveInBackground();
ParseObject paksiw = new ParseObject("Menu_Item");
paksiw.put("item_name", "Paksiw");
paksiw.put("item_price", 80.00);
paksiw.saveInBackground();
*/
// check for saved preferences, populate the fields
list = getSharedPreferences("Users", Context.MODE_PRIVATE);
if (!list.contains("nutzlich")) {
//Toast.makeText(this, "NO USERS", Toast.LENGTH_LONG).show();
}
EditText user = (EditText) findViewById (R.id.txtUser);
EditText pass = (EditText) findViewById (R.id.txtPass);
CheckBox rem = (CheckBox) findViewById (R.id.checkRem);
user.setText(list.getString("uname", ""), TextView.BufferType.EDITABLE);
pass.setText(list.getString("passw", ""), TextView.BufferType.EDITABLE);
rem.setChecked(list.getBoolean("checked", false));
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.login, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
public ArrayList<User> convert (String json) throws Exception {
ObjectMapper mapper = new ObjectMapper();
ArrayList<User> stuff = mapper.readValue(json,
new TypeReference<ArrayList<User>>(){});
return stuff;
}
public void logon (View v) throws Exception {
/**
* if one or more fields are empty, show toast
* if account doesn't exist, show toast
* otherwise, go to the account selection screen
*/
EditText user = (EditText) findViewById (R.id.txtUser);
EditText pass = (EditText) findViewById (R.id.txtPass);
CheckBox rem = (CheckBox) findViewById (R.id.checkRem);
String username = user.getText().toString().trim();
String password = pass.getText().toString().trim();
try {
//array = convert(list.getString("nutzlich", null));
if ((username.length() == 0 && password.length() == 0)) {
//Toast.makeText(this, "No User", Toast.LENGTH_SHORT).show();
}
else {
// check if inputed values exist in list
final Intent intent = new Intent (this, SelectAccount.class);
ParseUser.logInInBackground(username, password, new LogInCallback() {
public void done(ParseUser user, ParseException e) {
if (user != null) {
// If user exist and authenticated, send user to Welcome.class
startActivity(intent);
Toast.makeText(getApplicationContext(),
"Successfully Logged in",
Toast.LENGTH_LONG
).show();
finish();
}
else {
Toast.makeText(
getApplicationContext(),
"No such user exist, please signup",
Toast.LENGTH_LONG
).show();
}
}
});
if (rem.isChecked()) {
SharedPreferences.Editor editor = list.edit();
editor.putString("uname", username);
editor.putString("passw", password);
editor.putBoolean("checked", rem.isChecked());
editor.commit();
}
/*for (User a: array) {
if (user.getText().toString().equals(a.getUser()) &&
pass.getText().toString().equals(a.getPass())) {
if (rem.isChecked()) {
SharedPreferences.Editor editor = list.edit();
editor.putString("uname", user.getText().toString());
editor.putString("passw", pass.getText().toString());
editor.putBoolean("checked", rem.isChecked());
editor.commit();
}
startActivity(intent);
finish();
} else {
Toast.makeText(this, "Invalid Credentials",
Toast.LENGTH_SHORT).show();
break;
}
}*/
}
} catch (Exception e) {
if ((username.length() == 0 && password.length() == 0)) {
Toast.makeText(this, "No User", Toast.LENGTH_SHORT).show();
}
else {
Toast.makeText(this, "Invalid Credentials", Toast.LENGTH_SHORT).show();
}
}
}
public void register (View v) {
// go to register screen
Intent i = new Intent(this, Register.class);
startActivity(i);
finish();
}
}
package com.cs123grpE.restaurantorderingsystem;
import com.parse.*;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Parse.enableLocalDatastore(this);
Parse.initialize(this, "x2JAmf97XCaZbCJDTgxqGAUoLqcpzTxx48xlj4m4", "d3EwdWEYXfB93SH5jG8TWuwteH5d2yS94X1oegNv");
ParseInstallation.getCurrentInstallation().saveInBackground();
Intent i = new Intent(this, Login.class);
startActivity(i);
finish();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
package com.cs123grpE.restaurantorderingsystem;
import java.util.ArrayList;
public class MenuListItem {
String name, description;
ArrayList<String> tags;
double price;
public MenuListItem() {
// TODO Auto-generated constructor stub
}
public MenuListItem (String name, String description, ArrayList<String> tags,
double price) {
this.name = name;
this.description = description;
this.tags = tags;
this.price = price;
}
public String getName() {
return name;
}
public void setName (String name) {
this.name = name;
}
public String getDesc() {
return description;
}
public void setDesc (String description) {
this.description = description;
}
public ArrayList<String> getTags() {
return tags;
}
public void setTags (ArrayList<String> tags) {
this.tags = tags;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
}
\ No newline at end of file
package com.cs123grpE.restaurantorderingsystem;
public class OrderModel {
private String foodName="";
private String tableNumber="";
public String getFoodName() {
return foodName;
}
public void setFoodName(String foodName) {
this.foodName = foodName;
}
public String getTableNumber() {
return tableNumber;
}
public void setTableNumber(String tableNumber) {
this.tableNumber = tableNumber;
}
}
\ No newline at end of file
package com.cs123grpE.restaurantorderingsystem;
import java.util.ArrayList;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.*;
import android.content.*;
import com.parse.*;
public class Register extends Activity {
SharedPreferences list;
ArrayList<User> array;
ParseUser currUser;
@Override
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_register);
//Parse.enableLocalDatastore(this);
//Parse.initialize(this, "x2JAmf97XCaZbCJDTgxqGAUoLqcpzTxx48xlj4m4", "d3EwdWEYXfB93SH5jG8TWuwteH5d2yS94X1oegNv");
currUser = new ParseUser();
// load SharedPreferences, if it exists. else, make empty arraylist
list = getSharedPreferences("Users", Context.MODE_PRIVATE);
if (!list.contains("nutzlich")) {
array = new ArrayList<User>();
} else {
try {
array = convert(list.getString("nutzlich", null));
} catch (Exception e) {}
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.register, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
public ArrayList<User> convert (String json) throws Exception {
ObjectMapper mapper = new ObjectMapper();
ArrayList<User> stuff = mapper.readValue(json,
new TypeReference<ArrayList<User>>(){});
return stuff;
}
public void sayYes (View v) throws Exception {
EditText name = (EditText) findViewById (R.id.txtResto);
EditText user = (EditText) findViewById (R.id.txtUser2);
EditText pass = (EditText) findViewById (R.id.txtPass2);
String username = user.getText().toString().trim();
String password = pass.getText().toString().trim();
String restaurant = name.getText().toString().trim();
if (restaurant.length() == 0 || username.length() == 0 || password.length() == 0) {
Toast.makeText(this, "Please fill in all fields.", Toast.LENGTH_SHORT).show();
}
else {
// save in an arraylist (JSON in SharedPreferences)
/*User newUser = new User(name.getText().toString(),
user.getText().toString(), pass.getText().toString());
array.add(newUser);
ObjectMapper map = new ObjectMapper();
String json = map.writeValueAsString(array);*/
currUser.setUsername(username);
currUser.setPassword(password);
currUser.signUpInBackground();
/*SharedPreferences.Editor editor = list.edit();
editor.putString("nutzlich", json);
editor.commit();*/
Intent i = new Intent (this, Login.class);
startActivity(i);
finish();
}
}
public void sayNo (View v) {
Intent i = new Intent (this, Login.class);
startActivity(i);
finish();
}
}
\ No newline at end of file
package com.cs123grpE.restaurantorderingsystem;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;
public class SelectAccount extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_select_account);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.select_account, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
public void onBackPressed() {
// disables the back button
}
public void toAdmin (View v) {
// go to the Admin account main screen
Intent i = new Intent (this, Admin.class);
startActivity(i);
finish();
}
public void toKitchen (View v) {
// go to the Kitchen account main screen
Intent i = new Intent (this, Kitchen.class);
startActivity(i);
finish();
}
public void toCustomer (View v) {
// go to the Customer account main screen
Intent i = new Intent (this, Customer.class);
startActivity(i);
finish();
}
}
package com.cs123grpE.restaurantorderingsystem;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
public class Settings extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_settings);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.settings, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
package com.cs123grpE.restaurantorderingsystem;
public class User {
String name, user, pass;
public User() {
// empty constructor
}
public User (String name, String user, String pass) {
this.name = name;
this.user = user;
this.pass = pass;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getUser() {
return user;
}
public void setUser (String user) {
this.user = user;
}
public String getPass() {
return pass;
}
public void setPass(String pass) {
this.pass = pass;
}
}
package com.cs123grpE.restaurantorderingsystem;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;
import com.parse.*;
public class ViewProfile extends Activity {
String itemname = "";
String description = "";
String tags = "";
double price = 0;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_view_profile);
Intent i = getIntent();
String name = i.getStringExtra("menu_name");
ParseObject x = null;
try{
x = (new ParseQuery("Menu_Item")).whereMatches("item_name", name).getFirst();
itemname = x.getString("item_name");
description = x.getString("item_desc");
tags = x.getString("ingridient_name");
price = x.getDouble("item_price");
}catch(Exception e) {}
TextView ax = (TextView) findViewById (R.id.tvName);
TextView bx = (TextView) findViewById (R.id.priceName);
TextView cx = (TextView) findViewById (R.id.tvDesc);
TextView dx = (TextView) findViewById (R.id.tvTags);
ax.setText(itemname);
bx.setText(Double.toString(price));
cx.setText(description);
dx.setText(tags);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.view_profile, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
public void back (View v) {
// go back to the Customer screen
finish();
}
public void addToCart (View v) {
// add selected item to Cart
}
public void onBackPressed() {
// go back to the Customer screen
finish();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment