I have an app, which has folowing architecture:
It has FragmentActivity
which contains a Fragment
. This fragment contains TabHost
with 4 tabs in there. Each tab has own layout. And I'm creating new fragments and bind them to these ayouts. Well, finally I have 4 fragments.
Each fragment can start some new fragments as it's child. I thought that each fragment has own backstack. But it seems like it's not. Looks like it common backstack for these fragments.
I mean if I choose first tab, and start new child fragment from there, then I select second tab, start new child fragment from there, then I back to first tab, and press back button, and it destroys child fragment from SECOND tab but not from the first tab. If I press back button one more time, then it successfully destroy child fragment from first tab.
Well, I found some kind of same problem here Separate Back Stack for each tab in Android using Fragments
Someone offers to wrap each of these 4 fragments to FragmentActivity
, but I'm afraid that it will take too much time to refactor all my code. Because project is finishing soon, and I don't have much time for such massive refactoring.
Maybe someone could offer better solution for my problem?
Dmitriy