Saturday, 24 August 2013

How to manage a back stack within a dialog on android

How to manage a back stack within a dialog on android

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.

No comments:

Post a Comment