Code example for MotionEvent

Methods: getXgetY

0
	} 
 
	private boolean pointerAreaTouched(MotionEvent event, int area) {				
		RectF transRect = new RectF(pointerAreaRects[area]);
		translationMatrix.mapRect(transRect);
		if(transRect.contains(event.getX(), event.getY()))
			return true;			 
		return false; 
	}	 
	 
	private boolean pointerTouched(MotionEvent event) {				
		RectF transRect = new RectF(pointerRect);
		translationMatrix.mapRect(transRect);
		if(transRect.contains(event.getX(), event.getY()))
			return true;			 
		return false; 
	}			 
 
	@Override 
	public boolean onTouchEvent(MotionEvent event) {
		// check if pointer is being moved or if we are in scroll mode or if the pointer is touched