Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 88
Registered: ‎02-11-2009
My Device: Not Specified

Close Dialog

HI All,,

 

I need help in, how i close this Dialog .

 

 

 

UiApplication.getUiApplication().invokeLater(new Runnable()
{
  public void run()
  {
    int dlg = Dialog.ask(Dialog.D_YES_NO,"welcome in blackberry", Dialog.NO);
              
    if(dlg == Dialog.YES)
    {
  ///how close this dialog.
    }

  }

});       

 

 

I used Dialog.ask,  to create dialog , i need to close this dialog when yes option press. how i do this

 

 

thanks.

Developer
Posts: 16,997
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Close Dialog

the dialog closes automatically when an option is selected. it is blocking and returns the selected value only after it is dismissed.

you can also use the close() method.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter