I have a check box and according to its status value of the code variable should change. Because I'm using it to next activity.
I have code as shown below,
String code;
String itemCode;
String MayoItemCode;
mayoBaseCB.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
if (mayoBaseCB.isChecked()) {
code = (MayoItemCode);
} else {
code.equals(itemCode);
}
}
});
itemcode and MayotItemCode has values and I want to assign it to the variable code according to the status of the checkbox.
I have tried these 2 ways (equaling) but it didn't work for me. Can anyone help me to solve this?
elseblock?