0

Before some days I have posted one question link

It is working perfectly, but i have added another fragment E. Now the problem is that i want to move from Fragment D to Fragment E but i want fragment D in its pause state. So i have done following code

getActivity().getSupportFragmentManager().beginTransaction().add(R.id.content_frame, departingCheckOutFragment).addToBackStack(TAG).commit();

It is working perfectly when i press back button. I am able to go to Fragment D in its resume state and createview is not called. But now when i press again back previous transaction is called Fragment C to Fragment D which i don't want to open. I directly want to go to Fragment B Can you please help me out with this issue?

Thank You

Community
  • 1
  • 1
  • If i understand you correctly.. You have Fragment B -> Fragment C -> Fragment D -> Fragment E transactions. And you want fragment C not appear in backstack? If yes, just do not add it to backstack in fragment B – aelimill Jan 06 '16 at 12:54
  • @aelimill have already done that. But i want fragment D to be in its pause state so i Used above code to go from D to E – mohammedali sunasara Jan 06 '16 at 12:55
  • Well, I think you should override onBackPressed() in Activity and make the the its logic working for you requirements – aelimill Jan 06 '16 at 13:30
  • @aelimill how? Its already working Just i have issue in going back from fragment D – mohammedali sunasara Jan 06 '16 at 13:36

0 Answers0