내 앱의 모든 활동에 개별 CountDownTimer가 있지만 작업간에 전환 할 때 문제가 발생합니다. 몇 밀리 초의 지연이 있으며 작업 사이의 전환이 지연없이 직접 이루어져야합니다. . 예를 들어, 내가 또한 CountDownTimer를 가지고 두 번째 활동으로 이동하는 버튼을 누르면 CountDownTimer을 가지고 활동 (1)에있어, 그것은 활동 2을 가지고 몇 밀리 초 소요이 내 코드입니다Android CountDownTimer가 애플리케이션 페이지 전환 속도를 늦춤니다.
countDownTimer21 = new CountDownTimer(6000, 1000) {
public void onTick(long millisUntilFinished) {
strLong = Long.toString(millisUntilFinished/1000);
time.setText(strLong);
}
public void onFinish() {
Intent fail = new Intent(Test10_D.this, FailPage10.class);
fail.putExtra("scorerecord", myscore);
next.putExtra("scorevalue", strLong);
startActivity(fail);
countDownTimer21.cancel();
//finish();
}
}.start();
제안 사항이 있으십니까? 고마워요