Code example for MotionEvent

Methods: getActiongetEdgeFlagsgetY

0
 
		if (isRefreshing() && mDisableScrollingWhileRefreshing) {
			return true; 
		} 
 
		if (event.getAction() == MotionEvent.ACTION_DOWN && event.getEdgeFlags() != 0) {
			return false; 
		} 
 
		switch (event.getAction()) {
 
			case MotionEvent.ACTION_MOVE: {
				if (mIsBeingDragged) {
					mLastMotionY = event.getY();
					pullEvent(); 
					return true; 
				} 
				break; 
			} 
 
			case MotionEvent.ACTION_DOWN: {
				if (isReadyForPull()) { 
					mLastMotionY = mInitialMotionY = event.getY();
					return true; 
				} 
				break; 
			}