There is an Activity with 5 fragments (wizard).
StartFrag -(start)-> Frag1 -(next)-> Frag2 -(next)-> SubmitFrag
-(submit)-> SuccessFrag.
After Taping SubmitMore button on Success fragment, I want to remove Frag1, Frag2 and SubmitFrag from backstage and return to StartFrag. How to do that?
You could try this
FragmentManager fm = getFragmentManager();
int count = fm.getBackStackEntryCount();
for(int i = 0; i < count; ++i) {
fm.popBackStack();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With