Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
Posts: 26
Registered: ‎06-10-2011
My Device: Blackberry 9800 Simulator
My Carrier: Fledge Simulated Network

pop specific screens on displaystack

Hi, I need to detect screens that are on displaystack, then pop certain screens onUndeactivate event (user presses the red/hangup button). So that when user switches back to the app, the remaining screen is displayed. Thanks in advance!
Developer
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: pop specific screens on displaystack

You get get the active screen from UiApplication and the use Screen.getScreenBelow() to iterate through them

Highlighted
Developer
Posts: 285
Registered: ‎08-26-2011
My Device: 9900
My Carrier: Not Specified

Re: pop specific screens on displaystack

[ Edited ]

You need not push your desired screen from the display stack. It violate STACK condition(First In First Out). Means if you want to push 5th screen out of 10 Screens directly it is impossible. First you all pop the screens and then push the active screen. 

 

Another way is when you push the sceen like........

 

UiApplication.getUiApplication().pushScreen(new ImagePopUpScreen(new SomeScreen()));

 

then you should not pop up the current screen by.........

UiApplication.getUiApplication().popScreen(UiApplication.getUiApplication().getActiveScreen());

 

Then when you click hangup button or back button you can get back screens.

 

===============================================================================

Feel free to click LIKE button which is at right side of the THUMB symbol.

 

=================================================================================
Feel free to click LIKE button if the solution helps you;
--
Regards,

ALI SHAIK.