How can I repeat this countdown timer in a specific way…?

后端 未结 1 1900
伪装坚强ぢ
伪装坚强ぢ 2020-12-22 05:10

In the game a random number (loadG1) outputted and is shown for 4 seconds. Once the four seconds are up, it disappears and the user must input its value to gain a point. Onc

相关标签:
1条回答
  • 2020-12-22 05:24

    RESOLVED

    I put the following after the score[0]++:

    number.setVisibility(View.VISIBLE);
    final int loadG1 = generateG1.nextInt(1000000) + 10000;
    number.setText(" " + loadG1);
    input.getText().clear();
    
    start();
    

    This way, all necessary changes are made and the timer begins anew. I also modified the visibility of the prompt TextView to ensure it only appear when the user is able to input an answer. Took me a while but this has been resolved.

    0 讨论(0)
提交回复
热议问题