Code example for MotionEvent

Methods: getActiongetPressuregetSizegetXgetY

0
		} 
		public void process(final MotionEvent event)
		{ 
			int action = -1;
			if( event.getAction() == MotionEvent.ACTION_DOWN )
				action = 0;
			if( event.getAction() == MotionEvent.ACTION_UP )
				action = 1;
			if( event.getAction() == MotionEvent.ACTION_MOVE )
				action = 2;
			if ( action >= 0 )
				DemoGLSurfaceView.nativeMouse( (int)event.getX(), (int)event.getY(), action, 0, 
												(int)(event.getPressure() * 1000.0),
												(int)(event.getSize() * 1000.0) );
		} 
	} 
} 
 
 
class DemoRenderer extends GLSurfaceView_SDL.Renderer {