title: Xamarin Android wait for button click
body: <p>In my xamarin android app, I'm trying to login with facebook account. If a Facebook account does not have the email address, I'm setting new content view with input and save button, how can I wait for a button click to continue the previous content view work?</p>
  
  <p>this is my code where I'm creating a new content view and want to wait for button click:</p>
  
  <pre><code>public void OnCompleted(JSONObject @object, GraphResponse response)
  {
      var email = @object.Get("email").ToString();
  
      if (string.IsNullOrEmpty(email))
      {               
          SetContentView(Resource.Layout.CompleteRegistrationView);
  
          //At this point, I want to wait until the user enters the email address and clicks the button. After that, I want to execute this method
          var button = FindViewById(Resource.Id.save_email_btn);
  
          button.Click += (s, arg) =&gt; {
              email = FindViewById&lt;EditText&gt;(Resource.Id.email_value).Text;
              CloseContextMenu();
          };
  
      }
      ((LoginViewModel)ViewModel).SaveUserCommandHandler();
  }
  </code></pre>