02-03-2012 02:45 AM
Hi, I have a problem with my dialog box. Long story short, this dialog box will pop-up at a certain time even at the home screen (so it will come out even the application is closed). Here's the code for the dialog box:
synchronized(UiApplication.getEventLock()){
UiEngine ui = Ui.getUiEngine();
Dialog dial = new Dialog(Dialog.D_YES_NO, "Open detik.com feeds?",
Dialog.YES,
Bitmap.getPredefinedBitmap(Bitmap.QUESTION),
Manager.VERTICAL_SCROLL);
ui.pushGlobalScreen(dial, 1, UiEngine.GLOBAL_QUEUE);
int response = ((Dialog)dial).getSelectedValue();
if (response == Dialog.YES) {
feeds();
}
}
}
Now, I want the application to push a new screen whenever "Yes" is selected. But it doesn't work. Can anyone help me?
Solved! Go to Solution.
02-03-2012 02:55 AM
02-03-2012 03:08 AM
Great it works! Thanks Simon! ![]()
02-03-2012 03:21 AM - last edited on 02-03-2012 03:26 AM
Simon, it works but the dialog box won't come out anymore unless the application is in the foreground...
EDIT: It comes out. I was trying doModal() and forgot to remove it. The thing that doesn't come out is the new screen.
02-03-2012 03:31 AM