0

I'm looking for the "Android way" of implementing a modal view which interrupts the current flow, and displays another set of screens (more than one). Once done, I'd like to go back to where I was. I'm actually looking for something similar to the iOS behavior described here.

Is there a standard way of doing it in Android (ICS)?

Thanks!

Ariel

Darshan Rivka Whittle
  • 32,989
  • 7
  • 91
  • 109
Ariel
  • 251
  • 1
  • 4
  • 11

1 Answers1

0

I think the functionality closest to a modal view in iOS would be an Activity with theme set to for example

<activity android:theme="@android:style/Theme.Dialog"/>

or

<activity android:theme="@android:style/Theme.Holo.Dialog"/>
  • Thanks Stuart. As far as I understand, using this method will display a kind of popup window on top of the current UI. But imagine that I need a complex screen there, and want to drill down into additional sub-screens, go back and forth, and once done, dismiss the whole thing and go back to my original context. On iOS, such a modal controller pops up from the bottom, takes up the whole screen, and you can navigate within it as much as you like. Once done it will hide by a transition from top to bottom, and you'll get back to your original context. Is there a similar approach in Android? – Ariel Jun 21 '12 at 13:38
  • You can make the dialog as complex as any regular activity, in that regard it's not different. For hierarchy, as in pushing viewcontrollers in a navigation controller in a modal, I don't think dialogs would be the best solution, but I'm afraid I can't think of a better solution either. If using the entire screen is no problem though, can't you use a regular non-dialog Activity? –  Jun 21 '12 at 14:48
  • Yes, I guess I can. I can even mimic the exact animation behavior of iOS. But I actually was trying to figure out whether there was a standard/recommended way of doing it on Android (in terms of User Experience more than in terms of how to implement in code), as this is a useful behavior in some cases. I'm actually used to iOS, and it looks like Android is a bit behind where it comes to well-designed user experience and guidelines. Anyway thanks a lot for helping! – Ariel Jun 21 '12 at 16:16
  • Although the choice is of course entirely yours, I personally would not try to mimic iOS animations on Android. It looks good on iOS where other apps have the same animation, but it would be out of place on Android because it would create a UI that feels inconsistent. Android has its own animations for presenting views. –  Jun 21 '12 at 16:53