Reputation: 43
I am new to Blackberry devlopment and i have created 3 screens for the Blackberry application. Now my question is how to link these screens like if iam on 1st screen and if i click a button like submit it should go to the next screen like this it should go from 2nd screen to 3rd screens. thanks
Upvotes: 0
Views: 386
Reputation: 4325
You add a listener (I have given code for the trackwheelClick listener below, but you can use others as well depending on if you want a keypress or touch etc.
I have written in the matter of implementing the event on the instantiated object itself, but you can also subclass ButtonField if you really want to.
ButtonField closeButton = new ButtonField("Close") {
public boolean trackwheelClick(int status, int time) {
UiApplication.getUiApplication().pushScreen(new NextScreen());
return true;
}
};
Upvotes: 1
Reputation: 3430
UiApplication.getUiApplication().pushScreen(yourNextScreen);
See the documentation on RIM website.
Upvotes: 2