Code example for GestureDetector.SimpleOnGestureListener

0
 
	public PassengerRoutesView(Context activity, AttributeSet attrs) {
		super(activity, attrs);
		this.activity = (BusMeActivity) activity;
		 
    	OnGestureListener lis = new SimpleOnGestureListener();
		gestureDetector = new GestureDetector(activity, lis);
		gestureDetector.setOnDoubleTapListener(new MyOnDoubleTapListener());
		this.state = State.CREATE;
	} 
	 
	MyOnDoubleTapListener onDoubleTapListener = new MyOnDoubleTapListener();
	@Override 
	public boolean onTouchEvent(MotionEvent e) {
		return gestureDetector.onTouchEvent(e);
	} 
	 
    class MyOnDoubleTapListener implements GestureDetector.OnDoubleTapListener {
 
		@Override 
Stop searching for code, let great code find you!  Add Codota to your java IDE