后退栈和历史栈有什么区别?

5
我在查找如何启动一个空的后退栈活动时,遇到了android:noHistory属性。它可以实现我的需求,但是我仍然好奇术语“历史栈”在android:noHistory文档中使用。我没有在API指南(例如任务和后退栈)中注意到该术语的使用情况,所以后退栈和历史栈之间是否存在区别,还是它们只是相同的东西? 更新 到目前为止,参考资料中使用了三个术语: 历史栈 后退栈 活动栈 这个问题可能会变得有点挑剔,因为它似乎可以互换使用,但我仍然很想知道它们之间是否有区别。

1
请查看以下链接:https://dev59.com/zWQn5IYBdhLWcg3wP1NU你会找到答案。 - Don G
@knokZ的链接提供了有用的信息.. 但是"历史堆栈"和android::noHistory呢? - Mohammed Ali
你在哪里找到“历史堆栈”这个术语的?我在这里没有找到:http://developer.android.com/guide/topics/manifest/activity-element.html#nohist 请添加一个链接。 - Simulant
@Simulant 这就是有趣的地方。在那个链接中,他们将其描述为“activity stack”,这很可能是后退栈。我添加了一个链接,其中提到了“history stack”。 - bcause
1个回答

1

我觉得它们都是相同的

来自于这里 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.

所以

历史轨迹 = 活动堆栈(保存最近的活动)= 历史堆栈

我们都知道,返回堆栈 是保存最近活动的一个。

因此,它们基本上是同一件事情。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接