udacity/Just-Java

Where is the activity_main.xml?

bltzu opened this issue · 3 comments

bltzu commented

I am trying to find which method to call for the onClick attribute for the Whipped cream CheckBox but I cannot find it in the repository.

Could you please identify the xml and/or the correct method to call?

Many thanks.

In MainActivity.java, in method submitOrder you'll find:

// Figure out if the user wants whipped cream topping
CheckBox whippedCreamCheckBox = (CheckBox) findViewById(R.id.whipped_cream_checkbox);
boolean hasWhippedCream = whippedCreamCheckBox.isChecked();

    // Figure out if the user wants choclate topping
    CheckBox chocolateCheckBox = (CheckBox) findViewById(R.id.chocolate_checkbox);
    boolean hasChocolate = chocolateCheckBox.isChecked();

close #4
@bltzu
Hi,
activity_main.xml is in the following address
Just-Java/app/src/main/res/layout/activity_main.xml

Closing this because question was answered.