Is Fragment.onStop() guaranteed to be called?

我只是一个虾纸丫 提交于 2019-12-03 16:23:39

onStop() fragment is no longer visible to the user either because its activity is being stopped or a fragment operation is modifying it in the activity.

This is generally tied to Activity.onStop of the containing Activity's lifecycle.

http://developer.android.com/reference/android/app/Fragment.html#onStop()

In Low memory, it is not guaranteed for both activity and fragment will call onStop() method

Note that this method may never be called, in low memory situations where the system does not have enough memory to keep your activity's process running after its onPause() method is called.

http://developer.android.com/reference/android/app/Activity.html#Fragments

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!