Do you know how can I clear all fragments in an activity, in layout and in backstack.
I know that we can clear backstack by using:
FragmentManager.popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);
But what about in layout which I have dynamically added to layout.
How can I remove all fragment when activity destroy
All fragments are automatically destroyed when the activity holding them is destroyed.
You do not need to bother. Once activity is destroyed all fragments will be destroyed too
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