android - Is Fragment.onStop() guaranteed to be called? -
from table @ link: http://developer.android.com/reference/android/app/activity.html#activitylifecycle
we can see android activity not killable until after onstop() has been called (for honeycomb , beyond).
do have same (documented) guarantee fragments?
would appreciate pointing me @ documentation stated.
edit: has been pointed out [fragment.onstop] generally tied activity.onstop of containing activity's lifecycle.
http://developer.android.com/reference/android/app/fragment.html#onstop()
but doesn't tell me fragment's onstop() guaranteed (at least not same level of clarity activity documentation gives.) there anywhere fragment.onstop() guarantee explicitly stated?
edit 2: based on discussion below, debating whether activity.onstop() guaranteed (it seems safe assume if not, neither fragment.onstop guaranteed). have moved question activity.onstop new thread: is activity.onstop() guaranteed called (api 11 +).
it seems me necessary, not sufficient, activity.onstop guaranteed called fragment.onstop guaranteed.
onstop()
fragment no longer visible user either because activity being stopped or fragment operation modifying in activity.
this tied activity.onstop of containing activity's lifecycle.
http://developer.android.com/reference/android/app/fragment.html#onstop()
in low memory, not guaranteed both activity , fragment call onstop() method
note method may never called, in low memory situations system not have enough memory keep activity's process running after onpause() method called.
http://developer.android.com/reference/android/app/activity.html#fragments
Comments
Post a Comment