I don't see where you need to block the main thread. Use your dialog as the first screen that is pushed onto the stack. Implement the dialog closed listener and attach it to the Dialog. Now when the dialog is closed, your code will be called with the return value, if the value is yes, push the next screen on the stack. You never need to block the thread to wait for the user to click on Yes/No.
|