Java tutorial
//package com.java2s; //License from project: BSD License import android.view.MotionEvent; public class Main { private static boolean nvExtensionSupported; private static int AXIS_RELATIVE_X; private static int AXIS_RELATIVE_Y; public static boolean eventHasRelativeMouseAxes(MotionEvent event) { if (!nvExtensionSupported) { return false; } return event.getAxisValue(AXIS_RELATIVE_X) != 0 || event.getAxisValue(AXIS_RELATIVE_Y) != 0; } }