android-lifecycle
android-lifecycle copied to clipboard
Documented the case where a Fragment may rerun onAttach() and onCreate()
Documented the case where a Fragment is popped from a FragmentManager's back stack and reused. This causes the Fragment to recreate its child FragmentManager, reattach, and run onCreate() again.
It is not obvious that this might happen, but it can.
FWIW, this reinitialization causes the FragmentManager returned by Fragment.getChildFragmentManager() to change, making it unsafe to store the FragmentManager reference across this change in the Fragment.