Code example for MotionEvent

Methods: getActiongetEdgeFlagsgetY

0
	 */ 
	public final void setRefreshing(boolean refreshing) {
		setRefreshingInt(null, refreshing, false);
	} 
 
	/** 
	 * @return true if this Attacher is currently in a refreshing state. 
	 */ 
	public final boolean isRefreshing() { 
		return mIsRefreshing;
	} 
 
	/** 
	 * @return true if this PullToRefresh is currently enabled (defaults to 
	 *         <code>true</code>) 
	 */ 
	public boolean isEnabled() { 
		return mEnabled;
	} 
 
	/** 
	 * Allows the enable/disable of this PullToRefreshAttacher. If disabled when 
	 * refreshing then the UI is automatically reset. 
	 *  
	 * @param enabled 
	 *            - Whether this PullToRefreshAttacher is enabled. 
	 */ 
	public void setEnabled(boolean enabled) {
		mEnabled = enabled;
 
		if (!enabled) {
			// If we're not enabled, reset any touch handling 
			resetTouch(); 
 
			// If we're currently refreshing, reset the ptr UI 
			if (mIsRefreshing) {
				reset(false); 
			} 
		} 
	} 
 
	/** 
	 * Call this when your refresh is complete and this view should reset itself 
	 * (header view will be hidden). 
	 *  
	 * This is the equivalent of calling <code>setRefreshing(false)</code>. 
	 */ 
	public final void setRefreshComplete() { 
		setRefreshingInt(null, false, false); 
	} 
 
	/** 
	 * Set a {@link HeaderViewListener} which is called when the visibility 
	 * state of the Header View has changed. 
	 *  
	 * @param listener 
	 */ 
	public final void setHeaderViewListener(HeaderViewListener listener) {
		mHeaderViewListener = listener;
	} 
 
	/** 
	 * @return The Header View which is displayed when the user is pulling, or 
	 *         we are refreshing. 
	 */ 
	public final View getHeaderView() {
		return mHeaderView;
	} 
 
	/** 
	 * @return The HeaderTransformer currently used by this Attacher. 
	 */ 
	public HeaderTransformer getHeaderTransformer() { 
		return mHeaderTransformer;
	} 
 
	@Override 
	public final boolean onTouch(final View view, final MotionEvent event) {
		if (!mIsHandlingTouchEvent && onInterceptTouchEvent(view, event)) {
			mIsHandlingTouchEvent = true;
		} 
 
		if (mIsHandlingTouchEvent) {
			onTouchEvent(view, event);
		} 
 
		// Always return false as we only want to observe events 
		return false; 
	} 
 
	final boolean onInterceptTouchEvent(View view, MotionEvent event) {
		if (DEBUG) {