1

Hello i got stucked and have no idea how to solve my problem.

So i have an app where i have a fragment.

From my fragment I can start 2 diffrent activities (lets call it activity1 and activity2).

When i start the activity1 user encounters chain of activties A->B->C->D (where back button is supposed to work as default) and is supposed to get through all of them and when he reaches the D activity i want to make it possible to move to the activity2, but after back button click from activity2 i want user to be moved to fragment from which he starts.

So i guess i need to somehow clear back stack for a particular point.

Any help will be appreciated

Szuler
  • 379
  • 4
  • 18
  • 1
    Take a look [here](https://stackoverflow.com/questions/4342761/how-do-you-use-intent-flag-activity-clear-top-to-clear-the-activity-stack) – Klevin Delimeta Mar 08 '18 at 15:24
  • Possible duplicate of [How do you use Intent.FLAG\_ACTIVITY\_CLEAR\_TOP to clear the Activity Stack?](https://stackoverflow.com/questions/4342761/how-do-you-use-intent-flag-activity-clear-top-to-clear-the-activity-stack) – Omid Heshmatinia Mar 08 '18 at 15:29

0 Answers0