onStart of new Activity is called before onStop of parent

后端 未结 1 1263
孤独总比滥情好
孤独总比滥情好 2021-02-01 16:58

I\'ve got an application. I use startActivity() to start activity.

Can anyone actually tell me why system is calling onStart() of new Activity

1条回答
  •  走了就别回头了
    2021-02-01 17:24

    If you have a read of the Activity Lifecycle documentation onStop is only called when the current activity is replaced by a new (or previous) one.

    For that to happen the other application has to start or resume... otherwise there would be a gap

    onPause of the current activity is (I would expect) called before the onStart of the replacing Activity

    0 讨论(0)
提交回复
热议问题