【问题标题】:What is the difference between a back stack and a history stack?后退堆栈和历史堆栈有什么区别?
【发布时间】:2015-01-15 09:30:44
【问题描述】:

我正在检查如何使用空返回堆栈启动活动,并遇到了android:noHistory 属性。它可以满足我的要求,但我仍然对android:noHistorydocs 中使用的“历史堆栈”一词感到好奇。在整个 API 指南(例如Tasks and Back Stack)中,我并没有注意到该术语的任何用法,那么返回堆栈和历史堆栈之间是否有任何区别,或者它们只是相同的东西?

更新

到目前为止,参考文献中使用了三个术语:

History stack

Back stack

Activity stack

这个问题可能会开始变得挑剔,因为它们似乎都可以互换使用,但我仍然有兴趣了解它们之间的差异。

【问题讨论】:

  • 通过这个stackoverflow.com/questions/16975485/…你会得到..
  • @knokZ 链接提供了有用的信息.. 但是“历史堆栈”和 android::noHistory 呢..
  • 您在哪里找到“历史堆栈”一词?我在这里没有找到它:developer.android.com/guide/topics/manifest/… 请添加链接。
  • @Simulant 这就是有趣的部分。在该链接中,他们将其描述为“活动堆栈”,最有可能是后堆栈。我在他们提到“历史堆栈”的地方添加了一个链接。

标签: android back-stack android-navigation


【解决方案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.

所以

Historical Trace = Activity Stack(保存最近的活动)= History Stack

我们都知道,BackStack 是最近举办活动的那个。

所以,所有的东西都差不多。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-05-10
    • 2016-01-19
    • 2016-08-18
    • 2011-11-20
    • 2020-10-24
    • 2014-07-13
    • 2011-02-15
    • 2016-10-12
    相关资源
    最近更新 更多