title: Android - Element with Touch and Click events
body: <p>I'm having problems trying to make an element respond differently when there is action like "click" or type "touch". When I click on the element (is a simple listener, not worth paste the code), it performs the action perfectly, but completely ignores the action of touch. That way I could associate the element to distinguish the two events?</p>
  
  <p>Should I apply the listener to the children of the view that the action is executed?</p>
  
  <p>Thanks.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Resolved!</p>
  
  <p>Added a check on the use of the touch event before calling it.</p>
  
  <pre><code>@Override
  public boolean dispatchTouchEvent(MotionEvent event) {
      super.dispatchTouchEvent(event);
      if (this.onTouchEvent(event))
          return this.onTouchEvent(event);
      else
          return false;
  }
  </code></pre>