title: Android: Two different events for single tap and long press/double tap?
body: <p>I am trying to develop a feature where a single tap of an item will call an Intent to go to another Activity, and a long press OR double tap of the item does something else, such as allow you to edit the text.</p>
  
  <p>So far I am only able to get both to happen at the same time but not individually. Does anyone have any ideas?</p>
  
  <pre><code>public boolean onTouchEvent(MotionEvent e) {
      return gestureScanner.onTouchEvent(e);
  }
  
  
  public boolean onSingleTapConfirmed(MotionEvent e) { 
      Intent i = new Intent(getContext(), SecondClass.class);
      getContext().startActivity(i);
  
      return true; 
  }
  
  public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { return false; }
  public void onLongPress(MotionEvent e) {
      Toast.makeText(getContext(), "Edit feature here", Toast.LENGTH_SHORT).show();
  
  }
  </code></pre>