demotics2002
demotics2002

Reputation: 810

Blackberry "device back" button terminates the application

I am developing a blackberry application and noticed that something does not happen as I expected.

I want to create a wizard where there are 3 screens to be displayed, one after the other.
1. On the first screen, the click "next" button displays the second screen. (OK)
2. On the second screen: if I click "next" it displays the third. (OK) When I click the "device's back" button, it displays the previous (1st screen). (OK)
3. On the third screen, if I click the "device's back" button it displays the second screen. (OK) But clicking the "device back" button again terminates the application instead of displaying the first screen.

I am just using simple pushScreen(screen) method in all the navigation.

Thanks.

Edit:
1. I think I got what I was looking for here. How to develop a multi screen Blackberry application?
2. I will just to implement the keyChar() method of the screen to call the previous screen as shown in the link in the item 1.

Upvotes: 2

Views: 2124

Answers (1)

Michael B.
Michael B.

Reputation: 3430

You can override the onClose event

public boolean onClose() {}

And then put the code you want it to do on close, like closing this window, and displaying another one.

Normally if you don't pull screen, you can go back with the back key.

Upvotes: 2

Related Questions