07-09-2012 08:23 AM
Sir,
I have a popupScreen and i pushed it globally and after 5 sec i want to popup this screen automatically......
but it does not work...below is the code...
UiApplication.getUiApplication().invokeLater(new Runnable()
{
Ui.getUiEngine().pushGlobalScreen(PopupScreen, 2,UiEngine.GLOBAL_MODAL);
try
{
Thread.sleep(5000);
}
catch (InterruptedException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
Ui.getUiEngine().popScreen(PopupScreen);
}
07-09-2012 08:30 AM
07-09-2012 09:52 AM - edited 07-09-2012 12:09 PM
Another approach might be to extend PopScreen and put the timer thread inside of the class. You can start the thread before pushing the screen and the have the thread automaticaly close the screen when the time expires.
07-09-2012 11:58 AM
please, share the code ,how i can use this....
07-09-2012 12:28 PM - edited 07-09-2012 12:29 PM
try this
UiApplication.getUiApplication().invokeLater(new Runnable()
{
public void run()
{
Screen _screen = new Dialog( "Test Dialog:",new String[] {"OK", "Cancel"}, new int[] {0,1},1,null);
Ui.getUiEngine().pushGlobalScreen(_screen, 1, UiEngine.GLOBAL_MODAL);
}
}, 5000, false);