Code example for MotionEvent

Methods: getRawXgetX

0
	/** 
	 * MotionEvent has no getRawX(int) method; simulate it pending future API 
	 * approval. 
	 */ 
	private static float getRawX(final MotionEvent event, final int pointerIndex) {
		final float offset = event.getX() - event.getRawX();
		return event.getX(pointerIndex) + offset;
	} 
 
	/** 
	 * MotionEvent has no getRawY(int) method; simulate it pending future API 
	 * approval. 
	 */ 
	private static float getRawY(final MotionEvent event, final int pointerIndex) {
		final float offset = event.getY() - event.getRawY();
		return event.getY(pointerIndex) + offset;
	} 
 
	/** 
	 * The listener for receiving notifications when gestures occur. If you want 
	 * to listen for all the different gestures then implement this interface.