I have for
running and when I click the button I want this for
to stop.
for (int i = 0; i < codigo.size(); i++) {
if (codigo.get(i).contains("Para") || Stop == true){
sendCommand("parou");
break;
} else {
sendCommand(codigo.get(i));
}
I am typing value type String
when it finds the word "To" it exits from for
, I put a type boolean Stop
when true it would exit the loop too, I change the value by pressing a button but it did not work.
I would like how could% quit% go through a button or would have another way to do that.