code: private boolean isClick(MotionEvent upEvent, float xDown, float yDown, float xUp, float yUp) {
          if (upEvent == null) return false;
          long time = upEvent.getEventTime() - upEvent.getDownTime();
          float distance = PointF.length( //
                  xDown - xUp, //
                  yDown - yUp);
          return time < MAX_CLICK_TIME && distance < MAX_CLICK_DISTANCE;
      }
docs: Test if a MotionEvent with the given start and end offsets
  can be considered as a "click".
  @param upEvent The final finger-up event.
  @param xDown   The x-offset of the down event.
  @param yDown   The y-offset of the down event.
  @param xUp     The x-offset of the up event.
  @param yUp     The y-offset of the up event.
  @return true if it's a click, false otherwise