开发者

OnClick of a Button display the next page

开发者 https://www.devze.com 2023-04-04 02:57 出处:网络
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:

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

精彩评论

暂无评论...
验证码 换一张
取 消