title: messing with touch / click events
body: <p>This doesn't seem like a typical view layout which I'm having trouble with.</p>
  
  <p>I have two listViews.  </p>
  
  <p>Each <code>listView</code> has <code>touchListener</code><br>
  (whose purpose is to synchronize scrolling by calling dispatchTouchEvent() to another listView)</p>
  
  <p><code>ListView</code> also has <code>onItemClickListener</code> to handle clicks on the row of listView.</p>
  
  <p>Everything works as intended up to here.  </p>
  
  <p>I'd like to add another <code>clickListener</code> to <code>subview-group of the listView's</code> row to handle click event on the subview.  </p>
  
  <p>After attaching this clickListener, I see listView's scroll doesn't always work.  </p>
  
  <p>I suspect its because the clickListener of this child view is inspecting touch events (to see if its indeed a <code>click</code>) before the parent(listView)'s touchListener.  </p>
  
  <p>I can think of two workarounds to this problem.   </p>
  
  <ol>
  <li><p>attach touchListener instead of clickListener to child, and make it <code>return false</code> for all touch event except <code>FINGER_UP</code> event.<br>
  on <code>FINGER_UP</code> event, I execute the method which I initially had in onClickListener</p></li>
  <li><p>public boolean onInterceptTouchEvent (MotionEvent ev)  </p>
  
  <p>Implement this method to intercept all touch screen motion events. This allows you to watch events as they are dispatched to your children, and take ownership of the current gesture at any point.<br>
  (ok... I'm confused, I thought touch events goes to child views first and propagate to parents if children don't handle the touches..)  </p></li>
  </ol>
  
  <p>.. How do I implement the method 1?<br>
  .. Please help me to figure out #2 as well and to grasp the touch delivery mechanism. </p>
  
  <ul>
  <li><p>EDIT -
  This is where I add OnClickListener to my subview.</p>
  
  <pre><code>        viewHolder.layout_author.setOnClickListener(new OnClickListener() {
                  @Override
                  public void onClick(View v) {
                      Intent profileIntent = new Intent(ImageListAdapter.this.activity, ProfileActivity.class);
                      profileIntent.putExtra("JsonUser", jsonAlbumImage.jsonUser);
                      ImageListAdapter.this.activity.startActivity(profileIntent);
                  }
              });
  </code></pre></li>
  </ul>