title: How to create focus change listener with data binding
body: <p>I am using following code for <code>EditText</code> focus change event and its working when I tap on one <code>EditText</code> to another <code>EditText</code> but fails when we tap outside the <code>EditText</code> .I have already added <code>focusable="true"and focusableInTouchMode="true"</code> but it does not work. </p>
  
  <pre><code>@BindingAdapter("onFocusChange")
  public static void onFocusChange(EditText 
  text, final View.OnFocusChangeListener 
  listener) {
     text.setOnFocusChangeListener(listener);
  }
  
  public class Handler {
     public View.OnFocusChangeListener 
        getOnFocusChangeListener() {
             return new 
     View.OnFocusChangeListener() {
          @Override
          public void onFocusChange(View 
                    view, boolean isFocussed
            {
              //Hide Keyboard
             }
            };
          }
       }
  
   &lt;data&gt;
    &lt;variable name="handler" type="Handler"/&gt;
  &lt;/data&gt;
  &lt;EditText app:onFocusChange="@{handler.OnFocusChangeListener}"/&gt;
  </code></pre>