startActivityForResult() を使用してアクティビティを開始しました。この新しいアクティビティでホーム ボタンをクリックし、アプリを再度開くと、アクティビティが閉じて前のアクティビティに戻ります。ライフサイクル メソッドのデフォルトの実装を入れて、ブレークポイントを設定しました。アプリを再度開いた後、次の処理が順番に実行されます。
@Override
protected void onResume() {
super.onResume();
// The activity has become visible (it is now "resumed").
}
@Override
protected void onPause() {
super.onPause();
// Another activity is taking focus (this activity is about to be "paused").
}
@Override
protected void onStop() {
super.onStop();
// The activity is no longer visible (it is now "stopped")
}
@Override
protected void onDestroy() {
super.onDestroy();
// The activity is about to be destroyed.
}
なぜ onStop() と onDestroy() を呼び出すのですか? 私はこれを行うことはできません。これをやめさせるにはどうすればよいですか?