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
New Contributor
punitmg
Posts: 3
Registered: ‎12-07-2010
My Device: Not Specified
Accepted Solution

Back(Escape key) button works for one level down only

Hi all,

I have a app with multiple screens. In the last screen(say Screen 2) i have various buttons , on click of which i'm pushing same screen (Screen 2) with a different constructor called. But when i push screens many screens , i cannot come back to previous screens. I'm able to navigate back only one step. If I navigate from Screen 2 to Screen 2a->Screen 2b-> Screen 2c->Screen 2d,  then i can come back only till Screen 2c.

 

This is the code in Screen 1

UiApplication.getUiApplication().pushScreen(

new SecondScreen());

In Screen 2 , this code is code successively,

UiApplication.getUiApplication().pushScreen

(new SecondScreen(startTimeNext,endTimeNext,timeBarMode+1,logObject));

I'm printing the screenCount (screenCount is 4 when i'm in Screen 2d) from the UIApplication class and i'm getting correct number of screens in the stack. But i'm not able to navigate back to the previous screens.

Please let me know if i'm doing something wrong or why is it not navigating back.

Thank you

Punit

Please use plain text.
New Contributor
punitmg
Posts: 3
Registered: ‎12-07-2010
My Device: Not Specified

Re: Back(Escape key) button works for one level down only

Solved.

 

All i had to do was return  true from onSavePrompt() method. i was returning false initially.

Please use plain text.