Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Modal dialog

$
0
0

I create a dialog with the following code:

              protected void Dialog(string msg)
    {
        AlertDialog.Builder builder = new AlertDialog.Builder (this)/;
        // Get the layout inflater
        LayoutInflater inflater = this.LayoutInflater;
        // Inflate and set the layout for the dialog
        // Pass null as the parent view because its going in the dialog layout
        builder.SetView (inflater.Inflate (Resource.Layout.DialogLayout1, null));               
        AlertDialog dialog = builder.Create();
        dialog.Show();  
        //more functionality...
    }

Eventually, the dialog is closed with:

dialog.Dismiss();

However, the code I use which calls Dialog() to invoke it, sees the line followingthe dialog's invocation executed immediately, while the dialog is open. How can I invoke this dialog in a modal manner, so that the linefollowing its invocation is not executed until after dialog.Dismiss() is performed? Thanks


Viewing all articles
Browse latest Browse all 204402

Trending Articles