关于Activity的singleInstance特性
MainActivity --启动--> ActivityA(singleInstance)
Task 2 Back Stack in the foreground:
ActivityA
Task 1 Back Stack:
MainActivity
MainActivity --启动--> ActivityA(singleInstance)--启动--> ActivityB
Task 1 Back Stack in the foreground:
ActivityB
MainActivity
Task 2 Back Stack:
ActivityA
MainActivity --启动--> ActivityA(singleInstance)--启动--> ActivityB ----> ActivityA
Task 2 Back Stack in the foreground:
ActivityA
Task 1 Back Stack:
ActivityB
MainActivity
MainActivity --启动--> ActivityA(singleInstance)--启动--> ActivityB ----> ActivityA ----> ActivityB
Task 1 Back Stack in the foreground:
ActivityB
ActivityB
MainActivity
Task 2 Back Stack:
ActivityA
用以下调试命令查看堆栈:
adb shell dumpsys activity activities