Java tutorial
//package com.java2s; //License from project: Apache License import android.view.MotionEvent; import java.util.Locale; public class Main { public static String formatTouchPoint(MotionEvent mv) { if (mv == null) { return ""; } return String.format(Locale.ENGLISH, "x:%f, y:%f rawX:%f rawY: %f", mv.getX(), mv.getY(), mv.getRawX(), mv.getRawY()); } }