-1

I need to create a modal dialog in Android. By modal, I mean the code should stop executing and wait for the dialog to close. When I tried AlertDialog or PopupWindow, the code always continues without waiting.

rgy
  • 13
  • 5
  • what code always continues? Did you start something in a background thread? When you pop the dialog, stop that work. – ataulm Dec 29 '16 at 15:06

1 Answers1

0

I believe you will find your answer here

Dialogs / AlertDialogs: How to "block execution" while dialog is up (.NET-style)

In general you should not be blocking the code while a dialog is visible, your logic should be different and fit android way of doing things.

Community
  • 1
  • 1
Idanatz
  • 397
  • 2
  • 8