Код: Выделить всё
private String createOrderSummary(int priceOfOrder) {
CheckBox checkBoxValue = (CheckBox) findViewById(R.id.checkbox);
CheckBox checkBox2Value = (CheckBox) findViewById(R.id.checkbox2);
boolean WhippedCream = checkBoxValue.isChecked();
boolean chocolate = checkBox2Value.isChecked();
EditText Name = (EditText) findViewById(R.id.Name);
return "Name: " + Name.getText() +
"\nAdd Whipped cream? "+(WhippedCream) +
"\nAdd Chocolate? "+(chocolate) +
"\nQuantity: "+quantity +
"\nTotal: $"+(priceOfOrder)+
"\nThank you!";
}
< /code>
Это мой код после: < /p>
CheckBox checkBoxValue = (CheckBox) findViewById(R.id.checkbox);
CheckBox checkBox2Value = (CheckBox) findViewById(R.id.checkbox2);
boolean WhippedCream = checkBoxValue.isChecked();
boolean chocolate = checkBox2Value.isChecked();
private String createOrderSummary(int priceOfOrder) {
EditText Name = (EditText) findViewById(R.id.Name);
return "Name: " + Name.getText() +
"\nAdd Whipped cream? "+(WhippedCream) +
"\nAdd Chocolate? "+(chocolate) +
"\nQuantity: "+quantity +
"\nTotal: $"+(priceOfOrder)+
"\nThank you!";
}
Подробнее здесь: https://stackoverflow.com/questions/541 ... -terminate