我有3項活動(a,b和c)。在活動中,我有一個倒數計時器,在幾秒鐘的活動之後開始。在活動中,用戶可以開始活動C:活動未完成
Intent myIntent = new Intent(a.this, c.class);
a.this.startActivity(myIntent);
finish();
與此代碼我要完成的countdowntimer活動,並啓動C。現在的問題是:當用戶啓動c時,c啓動,但倒計時沒有停止,並在完成時啓動活動b。爲什麼?我已經用倒數計時器來清理洞穴活動了。我不明白。我也試過onDestroy()
,但它不起作用。 我Countdowntimer:
new CountDownTimer(7000, 1000) {
public void onTick(long millisUntilFinished) { }
public void onFinish() { }
}.start();
你是怎麼實現倒數計時器的?> – slayton
是的,我已經實現了它。 – nameless
您應該停止onStop()函數的活動a – whoabackoff