lundi 18 juillet 2016

Looping switch-case (Java)

I'm trying to loop a switch case with 5 cases with breaks. (for those who know android coding, I have a countdown timer set up)

My logic is: I'm trying to wrap it in a loop, and when the countdown finishes, in the onFinish() I would call a variable that resets the switch-case, and runs it again from the start (the same switch-case).

I tried wrapping it in a while loop, with a boolean and checking if it's true or false, but neither of that does work.

There is no special code associated with the switch case, so you can give any example you want.

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire