Open xxv opened 10 years ago
v19 lifecycle goes:
I/LifecycleLog(28061): TestFragment.onPause / →☐
I/LifecycleLog(28061): TestFragment.onPause / ☐→
I/LifecycleLog(28061): MainActivity.onPause / →☐
I/LifecycleLog(28061): MainActivity.onPause / ☐→
whereas the compat library goes:
I/LifecycleLog(28061): MainFragmentActivity.onPause / →☐
I/LifecycleLog(28061): TestCompatFragment.onPause / →☐
I/LifecycleLog(28061): TestCompatFragment.onPause / ☐→
I/LifecycleLog(28061): MainFragmentActivity.onPause / ☐→
In my (very limited) testing, it seems that recent versions of the appcompat library pause fragments before activities.
@ekux44 Calling super.onWhatever()
inside all Activity lifecycle callbacks will invoke those lifecycle events on the Fragment Manager, and thus forwarding those events to each of the living fragments.
(Reported by Kurt Huwig via personal email)