我想通过调用从另一个活动(第一个活动)启动一个活动(第二个活动)startActivity(intent)
。在我真正做之前,我发现人们说生命周期方法是按以下顺序调用的:
FIRST Activity onCreate
FIRST Activity onStart
FIRST Activity onResume
FIRST Activity onPause
SECOND Activity onCreate
SECOND Activity onStart
SECOND Activity onResume
FIRST Activity onStop
SECOND Activity onResume
总是在之前调用吗FIRST Acitivity onStop
?我想
FIRST Activity onPause
FIRST Activity onStop
SECOND Activity onCreate
SECOND Activity onStart
SECOND Activity onResume
将被调用,但似乎没有。
另外,如果我只是在两个活动之间切换,
FIRST Activity onPause
SECOND Activity onRestart
SECOND Activity onStart
SECOND Activity onResume
FIRST Activity onStop
方法是否总是按此顺序调用?