If I have 6
activities say Activity1 ,Activity2, Activity3, Activity4, Activity5, Activity6
the flow is Activity1-> Activity2-> Activity3-> Activity4-> Activity5-> Activity6
. I want to go to Activity3
from Activity6
only if I am on Activity6
. if I am at Activity4
or Activity5
then normal back stack will work. I don't want to clear the activity from top unless I'm at 6th. So please read what I am asking before marking it as duplicate
Asked
Active
Viewed 32 times
0

aditya kanrat
- 9
- 2
-
1check https://developer.android.com/codelabs/android-navigation?hl=en#0 – Jaiprakash Soni Feb 12 '21 at 09:13
-
this is not what I was asking I don't want to clear when I go to 5 activity I will clear the last two top only I am at the 6th activity. I have already done this but not my solution @JaiprakashSoni – aditya kanrat Feb 12 '21 at 12:50
-
1Do you mean you want this to happen when the user uses the system back function? If so, you should clarify that in the question. – Ryan M Feb 17 '21 at 18:47