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

Clear backstack #12

Open
parassftpl opened this issue Oct 14, 2016 · 1 comment
Open

Clear backstack #12

parassftpl opened this issue Oct 14, 2016 · 1 comment

Comments

@parassftpl
Copy link

I have a button in my Activity.
On click of button, I want to clear whole backstack and keep my home fragment.

How do I do that?

@fengdai
Copy link
Owner

fengdai commented Oct 17, 2016

List<IMasterFragment> fragments =  getFragmentMaster().getFragments();
for(int i = fragments.size() - 1; i > 0; i--) {
    fragments.get(i).finish();
}

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

2 participants