views:

87

answers:

2

Hi

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

A: 

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

Screen currentScreen = UiApplication.getUiApplication().getActiveScreen();
                UiApplication.getUiApplication().popScreen(currentScreen);
Vivart
Hi Vivart thanks for the suggestion..But I used this code snippet and see but it is not working for me. I dont know where I commetted mistake. Actually what I am doing is, I wrote the code for homescreen in a class with button and I implement the code for secondscreen(when displayed the button clicked on homescreen) with a btn whn clicked on it should takes to the homescreen adding in a VFM in another class which is in same class.So I implemented the Fieldchangelisterner and put the setChangelisters in corresponding classes.Can you please explain me where I committed the mistake.Thanks.
Koushik
A: 

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

Nikolay Moskvin