I writing a BlackBerry app which has multiple screens that the user navigates through (like a survey). After submitting the survey the app must return to the start screen, after which, they must not be allowed to navigate back to the screens which were previously shown.
What would be the correct way to implement this?
Currently I'm calling
UiApplication.getUiApplication().popScreen(UiApplication.getUiApplication().getActiveScreen());
as many times as there were different screens. Is there perhaps a more elegant solution to get back to the start screen?
UiApplication.getScreenCount()
will always give you the number of screens, so you can just do this (from anywhere, it doesn't even have to be from any particularScreen
class):