how can i navigate screens on button click.
there are two buttons , previous and next.
when i click the previous button, a screan1 will be displayed and when i press next ,a screan2 will be displayed and so on.
how can i navigate screens on button click. there are two buttons , previous
Share
There are a couple of different ways to do this. The UI library on a Blackberry will maintain a stack of screens for you so you can either:
1) when a button is pressed, create a new screen and push it onto the stack, then remove the old screen and let it be garbage collected; or
2) when a button is pressed, determine if a screen for that button already exists on the stack and move it to the front, or create a new one as above. In this case you don’t have to remove the screens, but if you have a lot of complex screens you could run out of resources.
See: net.rim.device.api.ui.UiApplication.pushScreen(Screen screen) and net.rim.device.api.ui.UiApplication.popScreen(Screen screen)