From 5410a93b2c2a651d6f8638ad75edf3cd36390a14 Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 11 Dec 2021 14:47:17 -0500 Subject: [PATCH] Added More amount types --- .../com/example/cmsc355cookbookapp/Ingredients_class.java | 3 --- .../java/com/example/cmsc355cookbookapp/MainActivity.java | 7 +++++++ app/src/main/res/values/strings.xml | 8 +++++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/example/cmsc355cookbookapp/Ingredients_class.java b/app/src/main/java/com/example/cmsc355cookbookapp/Ingredients_class.java index a2e6724..157569d 100644 --- a/app/src/main/java/com/example/cmsc355cookbookapp/Ingredients_class.java +++ b/app/src/main/java/com/example/cmsc355cookbookapp/Ingredients_class.java @@ -16,10 +16,8 @@ public Ingredients_class (int ing_id, String name, int amount, String amount_typ Amount_type = amount_type; this.need = need; } - public Ingredients_class() { } - //toString @Override public String toString() { @@ -31,7 +29,6 @@ public String toString() { ", need=" + need + '}'; } - //getters and setters public void setIng_id(int ing_id) { this.ing_id = ing_id; diff --git a/app/src/main/java/com/example/cmsc355cookbookapp/MainActivity.java b/app/src/main/java/com/example/cmsc355cookbookapp/MainActivity.java index 9d18cfd..42ae682 100644 --- a/app/src/main/java/com/example/cmsc355cookbookapp/MainActivity.java +++ b/app/src/main/java/com/example/cmsc355cookbookapp/MainActivity.java @@ -36,6 +36,13 @@ public void onClick(View v) { openPantry(); } }); + + recipe_btn.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + openRecipes(); + } + }); } public void openPantry() { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7d698bf..cf7d6d9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -15,13 +15,15 @@ Pounds Ounces + Gallons + Quarts + Pints Cups - tablespoon - teaspoon + Tablespoon + Teaspoon Grams Kilograms Liter MilliLiters - pint \ No newline at end of file