5

我想要:

open 1, 2, 3 activities
1 > 2 > 3  

back to #2
1 > 2

open #4 activity
1 > 2 > 4

back to #2
1 > 2

restore #3 activity
1 > 2 > 3

“恢复”是指打开以前关闭的活动而不重新创建。我怎样才能做到这一点?

谢谢!

4

1 回答 1

6
open 1, 2, 3 activities
1 > 2 > 3  

back to #2
1 > 2          // call startActivity for 2, don't call finish() in 3

open #4 activity
1 > 2 > 4

back to #2
1 > 2

restore #3 activity
1 > 2 > 3      // call startActivity for 3 with intent as Intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_To_FRONT);
于 2012-05-30T12:56:53.690 回答