Code example for MotionEvent

Methods: getActiongetEdgeFlagsgetY

0
 
	/** 
	 * Mark the current Refresh as complete. Will Reset the UI and hide the 
	 * Refreshing View 
	 */ 
	public final void onRefreshComplete() { 
		if (mState != PULL_TO_REFRESH) {
			resetHeader(); 
		} 
	} 
 
	@Override 
	public final boolean onTouchEvent(MotionEvent event) {
		if (!mPullToRefreshEnabled) {
			return false; 
		} 
 
		if (isRefreshing() && mDisableScrollingWhileRefreshing) {
			return true; 
		} 
 
		if (event.getAction() == MotionEvent.ACTION_DOWN && event.getEdgeFlags() != 0) {
			return false; 
		} 
 
		switch (event.getAction()) {