Imagine this scenario: I have a Fragment
in a Pager
. I try to switch to other apps, so that the Activity
owning my pager (and my fragment) will be stopped and temporarily destroyed, eventually.
So, when I come back to my Activity, the Fragment
's callbacks onCreate
, oncreateview
and so forth are called. But none of the Fragment's onDestroy
callbacks were called before! It seems that after "onStop" the fragment is destroyed at once. Is it a normal behavior? Is it maybe because the Activity
is destroyed without a call to its onDestroy
?
onDestroy
oronDestroyView
on theFragment
because I have a nested fragment in it that I would like to remove in order to be recreated whenonCreateView
is called back – Alexaalexander