我正在检查如何使用空返回堆栈启动 Activity 并遇到 android:noHistory
属性。它可以满足我的要求,但我仍然对 docs 中使用的术语“历史堆栈”感到好奇android:noHistory
。在整个 API 指南(例如 Tasks and Back Stack )中,我没有注意到该术语的任何用法,那么返回堆栈和历史堆栈之间是否存在任何差异,或者它们只是同一件事?
更新
到目前为止,引用文献中使用了三个术语:
这个问题可能会开始变得挑剔,因为它们似乎都可以互换使用,但我仍然有兴趣了解它们之间的差异(如果有的话)。
最佳答案
我觉得他们都一样
由此 http://developer.android.com/guide/topics/manifest/activity-element.html#nohist
android:noHistory
A value of "true" means that the activity will not leave a
historical trace. It will not remain in the activity stack
for the task, so the user will not be able to return to it.
所以
Historical Trace = Activity Stack(持有最近的 Activity )= History Stack
我们都知道,BackStack是举办近期 Activity 的。
所以,它们几乎都是一样的。
关于android - 返回堆栈和历史堆栈有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26990164/