当我们通过意图移到android中的下一个 Activity 时,下一个 Activity 将显示在屏幕上,而上一个 Activity 将隐藏。当我们按下返回按钮时,它将返回上一个 Activity 。我的问题是当我们将ist Activity 的意图用于另一个 Activity 时调用了哪个函数.onPause(),onStop()或任何其他plz答案
最佳答案
在第一个Activity中,当我们调用intent时,将调用OnPause()
在第二个 Activity 中,将调用OnCreate()-> OnStart()-> OnResume()
注意
根据文档,应该在 FIRST Activity.onStop()之前调用 SECOND Activity.onResume()
For Better Understanding please read Android lifecycle of Activity from developer/medium then go to Intent type
必须做For practice purpose create two activity and just override all method of
activity life cycle with log n then call intent n check log.
关于java - 我的问题是关于android Activity Intent ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64377516/