Code example for GestureDetector

Methods: setIsLongpressEnabled

0
		super(context);
		init(); 
	} 
 
	private void init() { 
		gestureDetector = new GestureDetector(this);
		gestureDetector.setIsLongpressEnabled(true);
	} 
 
	public void setSwipeListener(ISwipeListener swipeListener) {
		this.swipeListener = swipeListener;
	} 
 
	@Override 
	public boolean onTouchEvent(MotionEvent event) {
 
		if (!swipeEnabled)
			return super.onTouchEvent(event);
 
		// l("onTouch", event, false); 
		switch (event.getAction()) {