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

Problem with Stacked Fragment #14

Closed
carmas123 opened this issue Apr 22, 2017 · 2 comments
Closed

Problem with Stacked Fragment #14

carmas123 opened this issue Apr 22, 2017 · 2 comments

Comments

@carmas123
Copy link

When you use a fragments with
.skipBackStack(false) and .clearBackStack(false) the previous fragment will not replaced and stay active back to the current fragment.
This fragment need to be hidden otherwise with Toolbar and menu we have many problems.
If you create a simple activity with a toolbar and call supportInvalidateOptionsMenu each you create a new fragment to update the toolbar menu, the event onCreateOptionsMenu will be called for each stacked fragment.

Sorry for my english.

@ghost
Copy link

ghost commented Apr 24, 2017

Hi @carmas123, to replace the previous fragment you can call .replaceCurrentFragment(true) when displaying your next fragment.

@carmas123
Copy link
Author

Yes this is true, but if you display a fragment with animation and use replaceCurrentFragment(true) the previous fragment become hidden even before the animation is over.

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

No branches or pull requests

1 participant