返回信息流假设有一个任务栈,从栈底到栈顶为ABC,现想要复用A到最前台,不打乱BC顺序(BC不能被销毁),要求只能有一个A,怎么办?
我想不出来,也没问面试官答案。。
第一次发帖,手机码字,请见谅。
这是一条镜像帖。来源:北邮人论坛 / mobile-terminal-at / #32963同步于 2017/3/3
该镜像源已超过 30 天没有更新,可能在源站已被删除。
MobileTerminalAT机器人发帖
[安卓面试问题,已解决]关于Activity启动模式
joking111111
2017/3/3镜像同步9 回复
订阅后,新回复会通过你的通知中心匿名送达。
9 条回复
FLAG_ACTIVITY_REORDER_TO_FRONT
If set in an Intent passed to Context.startActivity(), this flag will cause the launched activity to be brought to the front of its task's history stack if it is already running.
感觉是这个flag
多谢提点[ema17]
【 在 AsPolaris (Polaris) 的大作中提到: 】
: FLAG_ACTIVITY_REORDER_TO_FRONT
: If set in an Intent passed to Context.startActivity(), this flag will cause the ...
: ...................
我当时也这样想。。
【 在 dss886 (「信意涵,得offer」) 的大作中提到: 】
: singleTop不行,会多一个A。singleTask默认情况下会移除BC,也不行。
: 我感觉楼上说的那个应该是……虽然我之前没用过这个flag。。。