Suppose that the current task stacks have four instances of activity: A0, A1, B0, C0, with C0 at the top of the stack. A0, A1 are instances of Activity A, B0 is an instance of Activity B, and C0 is an instance of Activity C0.
Now C0 creates the intent with FLAG_ACTIVITY_REORDER_TO_FRONT and triggers action A:
Intent intent = new Intent(this, A.class); intent.setFlag(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); startActivity(intent);
My question is: which instance will be brought to the foreground, A0 or A1? Will the task stacks become A0, B0, C0, A1 or A1, B0, C0, A0?
Thanks.
source share