Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

281 changes: 260 additions & 21 deletions app/src/main/assets/menu.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,70 @@ package edu.washington.snalegave.a448finalproject

import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import android.widget.Button
import android.widget.CheckBox
import android.widget.Toast

class AllergyAndDishTypeSelection : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_allergy_and_dish_type_selection)

val submitButton = findViewById(R.id.submitButton) as Button

val milkCheckBox = findViewById(R.id.milkCheckBox) as CheckBox
val eggCheckBox = findViewById(R.id.eggCheckBox) as CheckBox
val fishCheckBox = findViewById(R.id.fishCheckBox) as CheckBox
val shellFishCheckBox = findViewById(R.id.shellFishCheckBox) as CheckBox
val wheatCheckBox = findViewById(R.id.wheatCheckBox) as CheckBox
val soyCheckBox = findViewById(R.id.soyCheckBox) as CheckBox
val peanutCheckBox = findViewById(R.id.peanutCheckBox) as CheckBox
val glutenCheckBox = findViewById(R.id.glutenCheckBox) as CheckBox


val appetizerCheckBox = findViewById(R.id.appetizerCheckBox) as CheckBox
val soupCheckBox = findViewById(R.id.soupCheckBox) as CheckBox
val saladCheckBox = findViewById(R.id.saladCheckBox) as CheckBox
val sandwichCheckBox = findViewById(R.id.sandwichCheckBox) as CheckBox
val wokAndSauteeCheckBox = findViewById(R.id.wokAndSauteeCheckBox) as CheckBox
val steakCheckBox = findViewById(R.id.steakCheckBox) as CheckBox
val entreeCheckBox = findViewById(R.id.entreeCheckBox) as CheckBox
val dessertCheckBox = findViewById(R.id.dessertCheckBox) as CheckBox
val sideCheckBox = findViewById(R.id.sideCheckBox) as CheckBox


submitButton.setOnClickListener {

intent.putExtra("milkCheckBox", milkCheckBox.isChecked)
intent.putExtra("eggCheckBox", eggCheckBox.isChecked)
intent.putExtra("fishCheckBox", fishCheckBox.isChecked)
intent.putExtra("shellFishCheckBox", shellFishCheckBox.isChecked)
intent.putExtra("wheatCheckBox", wheatCheckBox.isChecked)
intent.putExtra("soyCheckBox", soyCheckBox.isChecked)
intent.putExtra("peanutCheckBox", peanutCheckBox.isChecked)
intent.putExtra("glutenCheckBox", glutenCheckBox.isChecked)

intent.putExtra("appetizerCheckBox", appetizerCheckBox.isChecked)
intent.putExtra("soupCheckBox", soupCheckBox.isChecked)
intent.putExtra("saladCheckBox", saladCheckBox.isChecked)
intent.putExtra("sandwichCheckBox", sandwichCheckBox.isChecked)
intent.putExtra("wokAndSauteeCheckBox", wokAndSauteeCheckBox.isChecked)
intent.putExtra("steakCheckBox", steakCheckBox.isChecked)
intent.putExtra("entreeCheckBox", entreeCheckBox.isChecked)
intent.putExtra("dessertCheckBox", dessertCheckBox.isChecked)
intent.putExtra("sideCheckBox", sideCheckBox.isChecked)


}





}



}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
android:layout_height="wrap_content"
android:orientation="vertical">



<TextView
android:id="@+id/headerAllergyAndDishTypeSelection"
android:layout_width="match_parent"
Expand Down Expand Up @@ -164,6 +166,7 @@
android:layout_height="wrap_content"
android:layout_below = "@+id/choosingAllergensText"
android:text="Entree" />

<CheckBox
android:layout_marginLeft="15dp"
android:layout_marginBottom="10dp"
Expand All @@ -172,6 +175,7 @@
android:layout_height="wrap_content"
android:layout_below = "@+id/choosingAllergensText"
android:text="Dessert" />

<CheckBox
android:layout_marginLeft="15dp"
android:layout_marginBottom="10dp"
Expand All @@ -181,6 +185,12 @@
android:layout_below = "@+id/choosingAllergensText"
android:text="Sides" />

<Button
android:id="@+id/submitButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Submit" />

</LinearLayout>
</ScrollView>

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'com.android.tools.build:gradle:3.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand Down