OnFinish () Is the CountDownTimer method too long?

Update: 20/11/13: This is still not allowed.

I also do CountDownTimerin the method onFinish(), I apparently do too much work, since the delay between the last second and finish takes more than 1 second (this is my delay between ticks).

This is my code.

mCountDownTimer = new CountDownTimer(GAME_LENGTH, 1000) {

public void onTick(long millisUntilFinished) {
                mCountDownTextView.setText("" + millisUntilFinished / 1000);
            }

            public void onFinish() {
                mCountDownTextView.setText("Game Over!");
                tl.setOnTouchListener(null);
                for (DotView dv : mAllDots) {
                    dv.setChangingColors(false, null, -1); // This is my own method
                }
                 }

Question: Is there a way to perform a potentially long action in a onFinish()method CountDownTimerwithout the actual time between the last and last tick? / P>

+4
source share
1 answer

I had the same problem, and I don’t think it calls code in onFinish(), which calls it.

, , (millisUntilFinished/1000 == 1) onFinish().

mCountDownTextView.setText(String.valueOf((millisUntilFinished/1000) - 1)) .

+1

All Articles