07-03-2010 12:56 PM
i have 3 screens... when the user make click in a button in the screen A... i send to screen B... and when the user make click in a Button in this screen i send to screen C.
Now i need put a buttton in the screen for what the user can return to screen A.. (home) if i use the key "arrow back" from the device return to screen B. and later Screen A.. so what i can do?
Solved! Go to Solution.
07-04-2010 03:50 AM
The display "stack" is not strictly a stack. You can pop a screen that is not at the top. So to do what you want, when you push screen C, you could pop screen B behind the scenes. However, users typically expect the "arrow back" key (actually, the ESCAPE key) to return to the previous screen. This scheme would run counter to that--when they pressed ESCAPE from screen C, they would go back to A (which is what you want, but not typical for BB apps.)
If you want the ESCAPE key to go back to screen B and have a separate button on screen C to return to screen A, just write the field change listener for the button to pop (or close) both C and B. Screen C would need to have (or be able to find) a reference to screen B.
Another approach is to have only a single screen and have three "modes": A, B, and C. When switching between modes, remove all fields and add the fields appropriate for the desired mode. The ESCAPE key--unless you override the default behavior--would then always exit the application (since there's only one screen).