In my application, I have five actions a, b, c, d, e. The user goes to the following sequence .... 1. a → b 2. b → c 3. c → d 4. d → e
before operation "d", if the user presses the "Back" button, the application should redirect the user to previous activity, for example, d → c, c → b, etc.
But when the user clicks the "Save" button in the "d" action, the application redirects the user to the "e" activity. Now, if the user clicks the back button, I want to redirect the user to operation "a", which is the home screen in my application.
I am completely new to android. I do not know how to achieve this flow. I tried this solution, but it did not give the desired result . and sorry for my bad english ...
source share