Code example for GestureDetector

Methods: setOnDoubleTapListener

0
 
	public ResidualVMEvents(Context context, ResidualVM residualvm) {
		_context = context;
		_residualvm = residualvm;
 
		_gd = new GestureDetector(context, this);
		_gd.setOnDoubleTapListener(this);
		//_gd.setIsLongpressEnabled(false); 
 
		_longPress = ViewConfiguration.getLongPressTimeout();
	} 
 
	final public void sendQuitEvent() { 
		_residualvm.pushEvent(JE_QUIT, 0, 0, 0, 0, 0, 0);
	} 
 
	public boolean onTrackballEvent(MotionEvent e) {
		_residualvm.pushEvent(JE_BALL, e.getAction(),
							(int)(e.getX() * e.getXPrecision() * 100),
							(int)(e.getY() * e.getYPrecision() * 100),
Contextual code suggestions in your IDE  Get Codota for Java