1

Can a dialog on an android tablet manage its own back stack? In other words: Can you show multiple levels of navigation within a dialog?

On iPad, this is a very common design pattern: A sheet or popover with a navigation bar on top.

When I try this on android (using Fragments) I only have one FragmentManager: the one from the hosting FragmentActivity. I can push multiple dialog fragments on its back stack. The visual effect of such a push, is that one dialog (A) disappears and another one (B) appears. As the user taps 'back', B will disappear again, and A will re-appear again. That is usable, but I was hoping for a smoother transition that feels more like a single context.

4

1 回答 1

2

ADialog是一个子窗口,Activity所以不,框架不会Dialog自动为您管理 s 的回栈。

你可以做的是使用一个活动并给它一个对话框主题。该活动看起来像一个对话框(即半透明背景等),但它具有正常活动的所有功能。请参阅此链接

于 2013-08-24T17:22:32.000 回答