Hi I am using this code to store checkboxes checked value as an integer
String CanDriveForward = "no";
public void AutoMoveForward(View v)
{
CheckBox MoveForwardCheck = (CheckBox) findViewById(R.id.MoveForwardCheck);
if (MoveForwardCheck.isChecked() == true) {
CanDriveForward = "yes"; //Code To Say yes or no to the first Auto Checkbox
}else {
CanDriveForward = "no";
}
}
MoveForwardCheck.setChecked(false);
this always returns no until you check it then it always returns yes unless you check it then uncheck it again then it returns no at the end of the code it resets to unchecked always but it needs to be always no except if it is checked it will return yes Thanks in Advance also this needs to be done by Wednesday so thank you for helping Expediently
Aucun commentaire:
Enregistrer un commentaire