title: Android Data Binding : can't find the setter for attribute
body: <p>Not sure how it works but according to <a href="https://stackoverflow.com/questions/31331048/the-android-data-binding-is-not-working-properly">this post</a> it's possible to bind specific listener by using different namespaces.</p>
  
  <p>I wanted to do the same thing with a searchview and bind a QueryTextListener to it but I get the following error : </p>
  
  <pre><code>Cannot find the setter for attribute 'bind:setOnQueryTextListener' 
  with parameter type android.widget.SearchView.OnQueryTextListener. 
  </code></pre>
  
  <p>What I did in my ViewModel :</p>
  
  <pre><code>public class MembersFragmentViewModel extends BaseObservable {
  
      private Context context;
      private MembersAdapter adapter;
      private RecyclerView recyclerView;
  
      public MembersFragmentViewModel(Context context, MembersAdapter adapter, RecyclerView recyclerView) {
          this.context = context;
          this.adapter = adapter;
          this.recyclerView = recyclerView;
      }
  
      public SearchView.OnQueryTextListener getQueryTextListener(){
          return new SearchView.OnQueryTextListener() {
              @Override
              public boolean onQueryTextSubmit(String query) {
                  return false;
              }
  
              @Override
              public boolean onQueryTextChange(String query) {
                  List&lt;Contact&gt; filteredModelList = filter(adapter.getContacts(), query);
                  adapter.animateTo(filteredModelList);
                  if(recyclerView != null)
                      recyclerView.scrollToPosition(0);
                  return true;
              }
          };
      } 
      //Code ...
  </code></pre>
  
  <p>And the xml :</p>
  
  <p>My namespace is declared in the layout tag like this :</p>
  
  <pre><code>xmlns:bind="http://schemas.android.com/apk/res-auto"
  </code></pre>
  
  <p>And my SearchView :</p>
  
  <pre><code>&lt;android.support.v7.widget.SearchView android:id="@+id/searchview"
          android:layout_width="match_parent"
          android:layout_height="40dp"
  
          android:background="@drawable/rounded_search_view_background"
          bind:setOnQueryTextListener="@{viewModel.QueryTextListener}"&gt;
  
  &lt;/android.support.v7.widget.SearchView&gt;
  </code></pre>
  
  <p>This is my data tag :</p>
  
  <pre><code>&lt;data&gt;
     &lt;variable
         name="viewModel"
         type="mypackagename.viewmodel.members.MembersFragmentViewModel"/&gt;
  &lt;/data&gt;
  </code></pre>
  
  <p>Many thanks for any clue !</p>