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