@Override
 protected void resetState() {
   super.resetState();
   mSloppyGesture = false;
   mPrevAverageY = 0.0f;
   mCurrAverageY = 0.0f;
 }
  @Override
  protected void updateStateByEvent(MotionEvent curr) {
    super.updateStateByEvent(curr);

    final MotionEvent prev = mPrevEvent;
    float py0 = prev.getY(0);
    float py1 = prev.getY(1);
    mPrevAverageY = (py0 + py1) / 2.0f;

    float cy0 = curr.getY(0);
    float cy1 = curr.getY(1);
    mCurrAverageY = (cy0 + cy1) / 2.0f;
  }
 @Override
 protected void resetState() {
   super.resetState();
   mSloppyGesture = false;
 }