单击按钮显示下一页

时间:2011-09-10 09:15:32

标签: blackberry button buttonclick

我是Blackberry的新手,有谁可以让我知道如何点击按钮进入下一页?

1 个答案:

答案 0 :(得分:3)

// 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);