I have this app where the user can open the activites like this:
MainActivity -> ActivityB -> ActivityC -> ActivityD
Now, I want the user to be able to return normally from:
MainActivity <- ActivityB <- ActivityC
Though, if went for ActivityD, I want it to close everything up to the MainActivity:
MainActivity <- ActivityD
Is this the right approach to accomplishing what I want:
https://stackoverflow.com/a/14785924/10532911
Edit: I originally thought that /14785924/10532911 applies as a solution. Though, I did not need results at all. The solution below is the one for my case.