I am starting a new application and should have a set of tabs. Inside each tab, I need several screens, each of which has its own back stack (required by the client). Here is a brief diagram of what I mean:
Tab 1 | |_Screen1a --> Screen1b --> Screen1c Tab 2 | |_Screen2a -->Screen2b Tab 3 | |_Screen3a --> Screen3b --> Screen3c --> Screen3d ...etc
Now I have done this before using FragmentActivity as the activity of the tab node. Each tab was then a FragmentActivity in which each fragment was placed. By this I mean the following:
FragmentActivity FragmentActivity1 | |_Fragment1 --> Fragment2 --> Fragment3 FragmentActivity2 | |_Fragment4 --> Fragment5 FragmentActivity3 | |_Fragment6 --> Fragment7 --> Fragment8 --> Fragment9 ...etc
Now that version 4.2 of the SDK and the new version of the support library are released, there are nested fragments. This allows you to place the fragment inside another fragment (I assume that you can continue nesting, although you have not tested it yet). I was thinking of switching to using nested fragments, as I am currently using deprecated methods in my tab activity. Essentially, I would have had the whole thread of my application implemented in fragments with one host activity.
Are there any problems in terms of performance, memory problems, etc.? Or should I go with the implementation I did before and use deprecated methods?
source share