Code example for MotionEvent.PointerCoords

0
	@Override 
	public boolean onTouchEvent (MotionEvent event) {
		super.onTouchEvent(event);
		 
		int numTouches = event.getPointerCount();
		PointerCoords tchPnt = new PointerCoords();
		event.getPointerCoords(0, tchPnt);
		float x = tchPnt.x;
		float y = tchPnt.y;
 
		if (numTouches == 1) {
			ShiftManager.shift(this, x, y, shiftWidth, shiftHeight);
		} 
		return true; 
		 
	} 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE