anyone can help me with my task I have one actvitiy where I open a new new Intent activity, and than in this new activity I open new intentions again (previsios actions do not close, so I can return to them when I click on device). I want to write an “exit button” and start a new activity, I can close only one previsios activity, but pre-previsios is still open. ideally - MainActivity → SettingsActivity → LogoutActivity (here we have to go back to loginActivity) I was judged
mIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
but no luck :(
Peter source share