title: xamarin android button click is not working
body: <p>I am new in xamarin. so just trying to make basic application. but button click is not working i.e. when click from application code is not executed </p>
  
  <p>MainActivity.cs</p>
  
  <pre><code>StartActivity(typeof(LoginActivity));
  </code></pre>
  
  <p>LoginActivity.cs</p>
  
  <pre><code>   protected override void OnCreate(Bundle savedInstanceState)
      {
          base.OnCreate(savedInstanceState);
          // Create your application here
          SetContentView(Resource.Layout.Login);
  
          Button button = FindViewById&lt;Button&gt;(Resource.Id.loginButton);
          if (button != null)
          {
              button.Click += (sender, e) =&gt;
              {
                  save();
              };
          }
      }
      public void save()
      {
          string ab = "asbs";
          Console.WriteLine("Working");
      }
  </code></pre>