01-16-2013 02:11 AM
Hello,
I am developing an application for BB os 7.1 using eclipse plugin.
I have used
public boolean onClose(){
int response = Dialog.ask(Dialog.D_YES_NO,
"Are you sure you want exit?");
if (response == -1)
{
return false;
} else
{
System.exit(0);
return true;
}
}
Suppose i am in screen 3 and click on back button, i must go back to screen 2 but now i get pop up for exiting the screen and also when i click on menu--> close i get the popup for exiting the app..
My requirement is to go back to the previous screen on click of back button and when i click menu--> close I must get a pop up for exiting the app.
I hope I am clear about my question.
Can anybody please help me out on this
Thanks in advance
01-16-2013 04:21 AM
Unfortunately I don't think that Close and onClose can distinguish between the back button and the Close menu item. So I think the only option you have to to provide your own close menu item that has the functionality that you want, replacing the System generated one.
But in fact I would not recommend that you do that. BB users expect both the back button and menu-->close to take them back one screen. So if you wish to give the BB user the option to exit the application then provide your own Exit menu item. Let Close and back do what they normally do.