How can I pause one CountDown Timer when another one is running?
问题 I have two CountDownTimers in my program: a 4 second one, and 24 second one. I want the longer timer to be paused for every 4 seconds the shorter timer is running. Then when the short timer finishes, the long timer begins counting down. Here's the code for the two timers: final CountDownTimer loop = new CountDownTimer(4000, 1000) { @Override public void onTick(long millisUntilFinished) { } @Override public void onFinish() { number.setVisibility(View.GONE); final TextView prompt = (TextView)