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
Developer
Deepu_George_Jacob
Posts: 235
Registered: ‎12-13-2011
My Device: Curve 9380
Accepted Solution

how to navigate one screen to another?

Hai, I am beginner in java development. I need to know how to navigate one screen to another screen. Anybody knows it please help me.. Thanks regards Deepu
Developer
jitendrasharma
Posts: 208
Registered: ‎08-04-2009
My Device: Not Specified

Re: how to navigate one screen to another?

just use following statement to navigate from one screen to another screen,

 

UiApplication.getUiApplication().pushScreen(new Screen());

 

to pop a screen from stack use

 

UiApplication.getUiApplication().popScreen();

Developer
superdirt
Posts: 541
Registered: ‎05-17-2009
My Device: Not Specified

Re: how to navigate one screen to another?

On BB there is a screen stack. The most recently pushed screen appears to the user. When the screen showing is popped (removed from the stack), the preceding screen in the stack is shown. Use pushScreen(screenname) to push another screen on top of the stack. Use popScreen(screenname) to remove the screen from the stack.

 

Scott

Developer
peter_strange
Posts: 19,609
Registered: ‎07-14-2008
My Device: Not Specified

Re: how to navigate one screen to another?

[ Edited ]

Screen navigation is usually a bit tricky for new developers.  There are many Threads on this forum that talk about it.  The most important consideration is that your Application has a Display Stack, so you push and pop screens from the Display Stack.  The screen on the top of the Stack is the one the user will see.

 

For further information I recommend you use the Search facility, search for "navigation" or "display stack".  You should find some useful Threads like:

http://supportforums.blackberry.com/t5/Java-Development/Screen-Navigation/m-p/129223

 

Edit: I see my thunder has been stolen!  Sorry didn't mean to duplicate your post Scott. 

Developer
superdirt
Posts: 541
Registered: ‎05-17-2009
My Device: Not Specified

Re: how to navigate one screen to another?

That's alright, Peter. As long as the question gets answered one way or another, I'm happy!

 

Scott

New Contributor
shubhansh
Posts: 2
Registered: ‎01-04-2013
My Device: Not Specified

Re: how to navigate one screen to another?

UiApplication.getUiApplication().pushScreen(new Screen());