Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activity.onPause() is called after Fragment.onPause() #9

Open
xxv opened this issue Aug 18, 2014 · 3 comments
Open

Activity.onPause() is called after Fragment.onPause() #9

xxv opened this issue Aug 18, 2014 · 3 comments
Labels

Comments

@xxv
Copy link
Owner

xxv commented Aug 18, 2014

Fragment.onPause is called before Activity.onPause; ditto for onStop

(Reported by Kurt Huwig via personal email)

@xxv xxv added the bug label Aug 18, 2014
@xxv
Copy link
Owner Author

xxv commented Aug 18, 2014

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 / ☐→

@ekux44
Copy link

ekux44 commented Nov 9, 2015

In my (very limited) testing, it seems that recent versions of the appcompat library pause fragments before activities.

@milosmns
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants