Code example for MotionEvent

Methods: getAction

0
	public interface OnListIdleListener { 
		void onListIdle(); 
	} 
 
	public boolean onTouch(View v, MotionEvent ev) {
		int action = ev.getAction();
 
		mFingerUp = (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_CANCEL);
 
		if (mFingerUp && mScrollState != OnScrollListener.SCROLL_STATE_FLING)
			mScrollHandler.sendListIdle(true);
 
		return false; 
	} 
 
	public void onFastScrollStateChanged(AbsListView view, int scrollState) {
		if (mFastScrollState == FastScrollView.SCROLL_STATE_FAST_SCROLLING && scrollState != FastScrollView.SCROLL_STATE_FAST_SCROLLING)
			mScrollHandler.sendListIdle(true);
		else if (scrollState == FastScrollView.SCROLL_STATE_FAST_SCROLLING)
			mScrollHandler.sendListIdle(DELAY_FAST_IDLE_DETECTION);