I am a newbie to Blackberry,could anyone please let me know how to go to the next page on click of a But开发者_运维技巧ton?
// inside of your current screen:
ButtonField btn = new ButtonField("Go to next screen");
btn.setChangeListener(new FieldChangeListener() {
public void fieldChanged(Field f, int arg1) {
NextScreen ns = new NextScreen();
UiApplication.getUiApplication().pushScreen(ns);
}
});
add(btn);
精彩评论