Commit 3a70302a authored by Kryzl Deanne Pascual's avatar Kryzl Deanne Pascual

Added Cart and Kitchen screens

parent e6117b14
......@@ -8,7 +8,7 @@
<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="D:/GitHub/CS123App/RestaurantOrderingSystem/libs/bolts-android-1.2.1.jar"/>
<classpathentry kind="lib" path="D:/GitHub/CS123App/RestaurantOrderingSystem/libs/Parse-1.10.3.jar"/>
<classpathentry kind="lib" path="libs/bolts-android-1.2.1.jar"/>
<classpathentry kind="lib" path="libs/Parse-1.10.3.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
......@@ -60,13 +60,20 @@
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Cart"
android:label="@string/title_activity_cart" >
</activity>
<activity
android:name=".Kitchen"
android:label="@string/title_activity_kitchen" >
</activity>
</application>
</manifest>
......@@ -60,13 +60,20 @@
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Cart"
android:label="@string/title_activity_cart" >
</activity>
<activity
android:name=".Kitchen"
android:label="@string/title_activity_kitchen" >
</activity>
</application>
</manifest>
# cache for current jar dependency. DO NOT EDIT.
# format is <lastModified> <length> <SHA-1> <path>
# Encoding is UTF-8
......@@ -29,86 +29,93 @@ public final class R {
public static final int prelimlogo=0x7f020003;
}
public static final class id {
public static final int action_settings=0x7f080032;
public static final int btnAddMenu=0x7f080014;
public static final int btnAddToCart=0x7f08002f;
public static final int btnAdmin=0x7f080026;
public static final int btnBack=0x7f08002e;
public static final int btnCancel=0x7f080023;
public static final int btnCart=0x7f080010;
public static final int action_settings=0x7f080035;
public static final int btnAddMenu=0x7f080016;
public static final int btnAddToCart=0x7f080032;
public static final int btnAdmin=0x7f080029;
public static final int btnBack=0x7f080031;
public static final int btnCancel=0x7f080026;
public static final int btnCart=0x7f080012;
public static final int btnConfigure=0x7f080007;
public static final int btnConfirm=0x7f080024;
public static final int btnCustomer=0x7f080028;
public static final int btnDelete=0x7f080012;
public static final int btnDeleteMenu=0x7f080013;
public static final int btnConfirm=0x7f080027;
public static final int btnCustomer=0x7f08002b;
public static final int btnDelete=0x7f080014;
public static final int btnDeleteMenu=0x7f080015;
public static final int btnDone=0x7f080001;
public static final int btnEditBill=0x7f080006;
public static final int btnEditMenu=0x7f080005;
public static final int btnKitchen=0x7f080027;
public static final int btnLogin=0x7f08001a;
public static final int btnFinalize=0x7f08000a;
public static final int btnKitchen=0x7f08002a;
public static final int btnLogin=0x7f08001d;
public static final int btnLogout=0x7f080008;
public static final int btnOff=0x7f08000a;
public static final int btnOn=0x7f08000b;
public static final int btnRegister=0x7f08001b;
public static final int btnRevert=0x7f080011;
public static final int btnOff=0x7f08000c;
public static final int btnOn=0x7f08000d;
public static final int btnRegister=0x7f08001e;
public static final int btnRevert=0x7f080013;
public static final int btnSave=0x7f080002;
public static final int btnSearch=0x7f08000e;
public static final int checkRem=0x7f080019;
public static final int list=0x7f08000f;
public static final int listview1=0x7f08000c;
public static final int btnSearch=0x7f080010;
public static final int checkRem=0x7f08001c;
public static final int list=0x7f080011;
public static final int listCart=0x7f080009;
public static final int listKitchen=0x7f080017;
public static final int listview1=0x7f08000e;
public static final int logo=0x7f080003;
public static final int logout=0x7f080029;
public static final int textView00=0x7f080030;
public static final int textView01=0x7f080031;
public static final int textView1=0x7f080015;
public static final int textView2=0x7f080017;
public static final int textView3=0x7f080025;
public static final int textView4=0x7f08001c;
public static final int textView5=0x7f08001d;
public static final int textView6=0x7f08001f;
public static final int textView7=0x7f080021;
public static final int logout=0x7f08002c;
public static final int textView00=0x7f080033;
public static final int textView01=0x7f080034;
public static final int textView1=0x7f080018;
public static final int textView2=0x7f08001a;
public static final int textView3=0x7f080028;
public static final int textView4=0x7f08001f;
public static final int textView5=0x7f080020;
public static final int textView6=0x7f080022;
public static final int textView7=0x7f080024;
public static final int textView8=0x7f080004;
public static final int textView9=0x7f080009;
public static final int tvDesc=0x7f08002c;
public static final int tvName=0x7f08002a;
public static final int tvPrice=0x7f08002b;
public static final int tvTags=0x7f08002d;
public static final int textView9=0x7f08000b;
public static final int tvDesc=0x7f08002f;
public static final int tvName=0x7f08002d;
public static final int tvPrice=0x7f08002e;
public static final int tvTags=0x7f080030;
public static final int txtItemName=0x7f080000;
public static final int txtPass=0x7f080018;
public static final int txtPass2=0x7f080022;
public static final int txtResto=0x7f08001e;
public static final int txtSearch=0x7f08000d;
public static final int txtUser=0x7f080016;
public static final int txtUser2=0x7f080020;
public static final int txtPass=0x7f08001b;
public static final int txtPass2=0x7f080025;
public static final int txtResto=0x7f080021;
public static final int txtSearch=0x7f08000f;
public static final int txtUser=0x7f080019;
public static final int txtUser2=0x7f080023;
}
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_customer=0x7f030002;
public static final int activity_edit_bill=0x7f030003;
public static final int activity_edit_menu=0x7f030004;
public static final int activity_login=0x7f030005;
public static final int activity_main=0x7f030006;
public static final int activity_register=0x7f030007;
public static final int activity_select_account=0x7f030008;
public static final int activity_settings=0x7f030009;
public static final int activity_view_profile=0x7f03000a;
public static final int group=0x7f03000b;
public static final int menu_item=0x7f03000c;
public static final int row=0x7f03000d;
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 customer=0x7f070002;
public static final int edit_bill=0x7f070003;
public static final int edit_menu=0x7f070004;
public static final int login=0x7f070005;
public static final int main=0x7f070006;
public static final int register=0x7f070007;
public static final int select_account=0x7f070008;
public static final int settings=0x7f070009;
public static final int view_profile=0x7f07000a;
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;
......@@ -117,9 +124,11 @@ public final class R {
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;
......
<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: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: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>
<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.Kitchen" >
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>
</menu>
......@@ -15,5 +15,7 @@
<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>
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();
}
}
......@@ -14,6 +14,7 @@ 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;
......@@ -166,6 +167,8 @@ public class Customer extends Activity {
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) {
......
package com.cs123grpE.restaurantorderingsystem;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
public class Kitchen extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_kitchen);
}
@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);
}
}
......@@ -48,8 +48,9 @@ public class SelectAccount extends Activity {
public void toKitchen (View v) {
// go to the Kitchen account main screen
Toast.makeText(this, "You have selected the Kitchen account.",
Toast.LENGTH_SHORT).show();
Intent i = new Intent (this, Kitchen.class);
startActivity(i);
finish();
}
public void toCustomer (View v) {
......
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