I'm using flag FLAG_ACTIVITY_SINGLE_TOP
and FLAG_ACTIVITY_CLEAR_TOP
to go back to my previous "standard" activity. I use FLAG_ACTIVITY_SINGLE_TOP
to prevent re-creating a new instance. But what I found is that the flag FLAG_ACTIVITY_SINGLE_TOP
is neglected and the activity is finished and re-created.
Here is what I found in docs. FLAG_ACTIVITY_CLEAR_TOP: It says that you can add
FLAG_ACTIVITY_SINGLE_TOP
when usingFLAG_ACTIVITY_CLEAR_TOP
to prevent "finish - recreate".Here is another doc. FLAG_ACTIVITY_CLEAR_TOP:
Note: If the launch mode of the designated activity is "standard", it too is removed from the stack and a new instance is launched in its place to handle the incoming intent. That's because a new instance is always created for a new intent when the launch mode is "standard".
Did I misunderstand the first doc?