title: Stop OnLongClickListener from firing while dragging
body: <p>I have a custom View with bitmaps on it that the user can drag about. </p>
  
  <p>I want to make it so when they long click one of them I can pop up a context menu with options such as reset position etc.</p>
  
  <p>In the custom View I add my OnLongClickListener:</p>
  
  <pre><code>this.setOnLongClickListener(new View.OnLongClickListener() {
      @Override
      public boolean onLongClick(View v) {
          // show context menu..
          return true;
      }
  });
  </code></pre>
  
  <p>And override onTouchEvent to look something like this:</p>
  
  <pre><code>public boolean onTouchEvent(MotionEvent event) {
      handleDrag(event);
      super.onTouchEvent(event);
      return true;
  }
  </code></pre>
  
  <p>The handleDrag function finds what object is been pressed, and handles updating it's position.</p>
  
  <p>My problem is that when I start to drag an image the OnLongClickListener fires also.  I'm not sure the best way around this.</p>
  
  <p>I've tried adding a threshold to handleDrag to return false if user touches down but doesn't attempt to drag, but I'm finding it still difficult to get the correct handler fired.</p>
  
  <p>Can anyone suggest a way to skip the OnLongClickListener while dragging?</p>