-1

I'm coding a navigation drawer on an Android app. Every time I push my first fragment I go to my Activity 1, and when I push the back button I return to my First Fragment which is my Default Fragment, so that is OK. But when I go to my Second Fragment I go to a new Activity (Activity2) but when I press the back button I return to my first fragment (like in the First Activity) BUT I want to return to my SECOND FRAGMENT.

Any help? Here is an image how I want it to works

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
androiddevjs
  • 21
  • 1
  • 6

1 Answers1

0

The Best Answer for this was already given @ Programmatically go back to the previous fragment in the backstack

For more detail about fragment backstack follow the link given in answer https://stackoverflow.com/a/10863743/9917175

Bhavesh Moradiya
  • 1,323
  • 14
  • 18