Java tutorial
//package com.java2s; import android.graphics.Point; import android.support.annotation.NonNull; import android.view.MotionEvent; public class Main { public static Point eventToPoint(@NonNull MotionEvent event) { return new Point((int) event.getX(), (int) event.getY()); } }