I have an App which has, let say 15 different sections. I use a single Activity with a FrameLayout where I load 15 different Fragments using a NavigationDrawer. I also have child fragments under few parent Fragments where I load swipe Tab layout.
So, in short, I have lots of fragments in my App.
The issue is, if I add the fragments to the BackStack while adding to the FrameLayout, the fragments never gets destroyed as long as my App lives (only View gets destroyed, which is expected behavior by design). To make it worse, if the user keep hovering to different Fragments, the size of the BackStack keeps increasing which can result memory issues.
So, I started googling and found several threads in SO where some suggests against using Fragments at all. But if I want to design each section using its own Activity, I have to add NavDrawer to each activity (or at least extend those activity to a base activity) which I am not sure if prudent.
That leaves to the question, is it a good design to have lots of fragments in a single activity? If it's fine, should I add the fragments to the BackStack? If I should, what about memory issues? And finally, has anybody tried NavigationDrawer across different activities? Is it efficient?
My apology for a series of questions.
Edit: Based on the responses so far, I want to clarify that, I know it is sort of generic question, and can result different opinion-based responses. So, I want to make it clear that, I am not looking for any decisive answer (becuase there might not be any), rather I wanted to open a discussion to hear from different perspectives.