Suppose the current task stacks has four activity instances, A0, A1, B0, C0, with C0 at the top of the stack. A0, A1 are instances of Activity A, B0 is instance of Activity B, and C0 is instance of Activity C0.
Now C0 creates an intent with FLAG_ACTIVITY_REORDER_TO_FRONT and starts Activity 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 front, A0 or A1? Will the task stacks become A0, B0, C0, A1 or A1, B0, C0, A0?
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…