java data types
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html
boolean: true and false
public void decrement(View view){
quantity = quantity - 1;
displayQuantity(quantity);
}
public void submitOrder(View view){
int price = calculatePrice();
log.v("MainActivity", "The price is " + price);
String priceMessage = createOrderSummary(price);
displayMessage(priceMessage);
}
public void decrement(View view){
quantity = quantity - 1;
displayQuantity(quantity);
}
public void submitOrder(View view){
CheckBox = whippedCreamCheckBox = (CheckBox) findViewById(R.id.whipped_cream_checkbox);
int price = calculatePrice();
String priceMessage = createOrderSummary(price);
displayMessage(priceMEssage);
}
checkbox
public class MyActivity extends Activity {
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.content_layout_id);
final CheckBox checkBox = (CheckBox) findViewById(R.id.checkbox_id);
if (checkBox.isChecked()) {
checkBox.setChecked(false);
}
}
}