Code example for GestureDetector

0
	private boolean showSelector;
	private boolean drawSelectorOnTop = false;
	private Rect selectorBounds = new Rect();
 
	private GestureDetector gestureDetector = new GestureDetector(getContext(),
			new GestureDetector.SimpleOnGestureListener() { 
 
				@Override 
				public void onShowPress(MotionEvent e) { 
					showSelector = true; 
					invalidate(getRefreshedSelectorBounds()); 
				} 
 
			}); 
 
	private OnTouchListener onHeaderTouchListener = new OnTouchListener() {
 
		float startY; 
 
		@Override 
		public boolean onTouch(View v, MotionEvent event) {