title: can't bind button onClick
body: <p>I'm facing a strange issue in my app. I can't bind a button's onClick event to a method.  Here's my code:</p>
  
  <pre><code>public class BookingViewModel extends BaseObservable {
      public void onAddInvite(View view) {
          invitationList.add(new Person(name, number, email)); 
          notifyPropertyChanged(BR.invitationsText);
      }
  }
  </code></pre>
  
  <p>xml:</p>
  
  <pre><code>&lt;layout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"&gt;
  
      &lt;data&gt;
  
          &lt;variable
              name="bookingViewModel"
              type="it.jgrassi.roombooking.viewmodel.BookingViewModel" /&gt;
      &lt;/data&gt;
      &lt;Button
              android:id="@+id/button_book"
              android:layout_width="89dp"
              android:layout_height="40dp"
              android:layout_marginBottom="8dp"
              android:layout_marginEnd="8dp"
              android:layout_marginStart="8dp"
              android:text="Book"
              app:layout_constraintBottom_toBottomOf="parent"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintStart_toStartOf="parent"
              android:enabled="@{bookingViewModel.bookingEnabled}"
              android:onClick="@{bookingViewModel::onAddInvite}"/&gt;
  &lt;/layout&gt;
  </code></pre>
  
  <p>I find it strange because in the same app I have a similar situation handling the onClick on a list item:</p>
  
  <pre><code>public class ItemRoomViewModel extends BaseObservable{
  public void onItemClick(View view) {
          //do stuff
      }
  }
  </code></pre>
  
  <p>xml:</p>
  
  <pre><code>&lt;layout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"&gt;
  
      &lt;data&gt;
  
          &lt;variable
              name="roomViewModel"
              type="it.jgrassi.roombooking.viewmodel.ItemRoomViewModel" /&gt;
      &lt;/data&gt;
  
      &lt;android.support.constraint.ConstraintLayout
          android:id="@+id/item_room"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="?android:attr/selectableItemBackground"
          android:clickable="true"
          android:onClick="@{roomViewModel::onItemClick}"
          android:paddingBottom="8dp"
          android:paddingTop="8dp"&gt;
  &lt;/layout&gt;
  </code></pre>
  
  <p>all other bindings work perfectly fine. also android studio make the method look like is being used. what am I doing wrong?</p>