我想:
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
“恢复”表示打开以前关闭的活动而不重新创建。 我怎么能这样做?
谢谢!
答案 0 :(得分: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);