title: Set onClick in xml for custom view in android in't work on some version
body: <p>I create custom view and use it in some xml activity then set <code>android:onClick="buttonOnClick"</code>. I defined <code>buttonOnClick</code> as <code>public</code> and write it in its activity and set <code>tools:context</code>.
  <br/>Activity.java</p>
  
  <pre><code> public void buttonOnClick(View view) {
          validate(view);
      }
  </code></pre>
  
  <p>layout.xml</p>
  
  <pre><code>&lt;LinearLayout 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"
      ...
      tools:context="com.test.myapp.Activity"&gt;
  
     &lt;com.test.myapp.GifImageViewComp
        ....
      android:onClick="buttonOnClick"  /&gt;
  </code></pre>
  
  <p>it's working on <code>Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.LOLLIPOP</code> but in other OS version, custom view xml onclick attribute try to find handler from view class instead of activity.
  <br /><br/>I don't want use implementation of onClick  or setOnClickListener on every view, i want use onClick in layout of activity</p>