title: Listview - onClickListener's onClick called on reused view
body: <p>I have list view and every row has multiple clickable areas. In bindView(I use CursorAdapter) I set onClickListener for every clickable area and everything works fine.</p>
  
  <p>Problem occurs when I click on view and at the same time notifyDataSetChanged is called (or cursor is changed)</p>
  
  <p>It seems that when I click first item, but before OnClickListener is called, view is reused(bindView is called) for second item and onClickListener is called on second item.
  My only idea is that view is reused after touch is fired but before onClickListener is called. Any idea how to fix it or what can be wrong?</p>
  
  <p><strong>EDIT:</strong> If clicked view is <strong>inside scrollable there is 180ms delay between onTouch and onClick</strong> to find out whether it's click or scroll. So if view is reused between onTouch and onClick, onClick is called on reused (wrong) row.</p>
  
  <p>Almost same can be more easily reproduces with OnLongClickListener.</p>
  
  <pre><code>@Override
    public void bindView(View view, Context context, Cursor cursor) {
           View clickableView = view.findViewById(R.id.clickable_view);
           clickableView.setOnClickListener(new View.OnClickListener() {
               public void onClick(View v) {
                   final int position = getListView().getPositionForView(v);
                   if (position != ListView.INVALID_POSITION) {
                        //it display position 2 even when I clicked at position 1
                       Toast.makeText(getContext(), "Position " + position, Toast.LENGTH_SHORT).show();
                   }
           });
    }
  </code></pre>