12-10-2010 12:14 PM
According to the 4.5 api reference, on the UiApplication class there are practically 3 push* methods to push screens:
That tells me that there are 3 types of screens: normal, modal and global.
I've been trying to google for documentation on these. Can you guys point me to any?
Basically, I'm trying to find out the difference among them, advantages/disadvantages, and typical use cases for each.
Solved! Go to Solution.
12-10-2010 12:50 PM
pushScreen displays the regular screens - whether Popup or Full screens. Screens are pushed on the stack and only the top screen can receive input events from touchscreen, keyboard and nagivation device. It is a non-blocking call. This is the main tool in your software development. You can dismiss the screen later with popScreen or just push another one on top of it.
pushModalScreen is a blocking call which returns only after the screen is dismissed. It is most useful for custom confirmation dialogs ("Delete file? Yes / No"). Most such scenarios (like the "delete file" etc.) can be covered by creative use of Dialog class but your application might have all kinds of weird requirements...
pushGlobalScreen displays a screen on a device-wide priority based queue, making sure that the screen is visible even if the application is running in the background. This is appropriate for all kinds of catastrophic alerts ("battery low, do you want to save your work?" etc.)