Friday, August 12, 2011

Push and Pop Screen in Blackberry

Apparently this is the Best example I found to push and Pop Screen. Everything is working so far. Only issue having after adding the second but which can not navigate to other screen. There got to be a way to do it.
http://stackoverflow.com/questions/1123414/how-to-navigate-back-to-the-previous-screen-in-blackberry


I am looking for the other excellent Article which might have the solution.

Found another Solution and have to try this:
The following function should fix my screen issue

  1. public void switchScreen(final Screen nextScreen) {
  2. final UiApplication ui = UiApplication.getUiApplication();
  3. final Screen currentScreen = ui.getActiveScreen();
  4. if (UiApplication.isEventDispatchThread()) {
  5. ui.popScreen(currentScreen);
  6. ui.pushScreen(nextScreen);
  7. } else {
  8. ui.invokeLater(new Runnable() {
  9. public void run() {
  10. ui.popScreen(currentScreen);
  11. ui.pushScreen(nextScreen);
  12. }
  13. });
  14. }
  15. }



No comments:

Post a Comment