开发者

Change the screen when click on the button

开发者 https://www.devze.com 2023-01-08 03:30 出处:网络
I am new to Blackberry..I am developing an application which contain the home screen having a button on it. When clicked on it, it is changing to new screen for that I used UiApplication.getUiApplicat

I am new to Blackberry..I am developing an application which contain the home screen having a button on it. When clicked on it, it is changing to new screen for that I used UiApplication.getUiApplication().pushScreen(new NewScreen()); in the fieldchangedListener method. In the newscreen I added a verticalFieldManager and add some images and a button.What I want is when I click on this button it should takes to the homescreen.

I implemented开发者_开发问答 the second screen functionality in NewScreen class which is in the main class.

Please let me know any suggestions.

Thanks Koushik


i think you want to go back to the previous screen. try this.

Screen currentScreen = UiApplication.getUiApplication().getActiveScreen();
                UiApplication.getUiApplication().popScreen(currentScreen);


Write this a code snippet, then I can help you. Perhaps You need to overload methods onClose, onSave or etc.


I can use the command close(); in the button event, thus you'll close the second Screen and return to the first one.

0

精彩评论

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