Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
staticx99
Posts: 24
Registered: 07-22-2009
Accepted Solution

Close all screens?

Some times I have many screen stacked... i'm able to hit back button till I come back to the main screen of the application but is there a way to close all the screens and come back to the main screen when I hit "Main" in my menu?

 

Thanks! 

Please use plain text.
Developer
Developer
rab
Posts: 283
Registered: 07-22-2008

Re: Close all screens?

Try this:

 

while (UiApplication.getUiApplication().getScreenCount() > 1)
     {
               UiApplication.getUiApplication().popScreen();
      }

 

Rab

Please use plain text.
Developer
staticx99
Posts: 24
Registered: 07-22-2009

Re: Close all screens?

Perfect!

 

Thanks!

Please use plain text.