added in version 22.1.0
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1

MotionEventCompat

public final class MotionEventCompat
extends Object

java.lang.Object
   ↳ android.support.v4.view.MotionEventCompat


Helper for accessing features in MotionEvent.

Summary

Constants

int ACTION_HOVER_ENTER

This constant was deprecated in API level 26.1.0. Use ACTION_HOVER_ENTER directly.

int ACTION_HOVER_EXIT

This constant was deprecated in API level 26.1.0. Use ACTION_HOVER_EXIT directly.

int ACTION_HOVER_MOVE

This constant was deprecated in API level 26.1.0. Use ACTION_HOVER_MOVE directly.

int ACTION_MASK

This constant was deprecated in API level 26.1.0. Use ACTION_MASK directly.

int ACTION_POINTER_DOWN

This constant was deprecated in API level 26.1.0. Use ACTION_POINTER_DOWN directly.

int ACTION_POINTER_INDEX_MASK

This constant was deprecated in API level 26.1.0. Use ACTION_POINTER_INDEX_MASK directly.

int ACTION_POINTER_INDEX_SHIFT

This constant was deprecated in API level 26.1.0. Use ACTION_POINTER_INDEX_SHIFT directly.

int ACTION_POINTER_UP

This constant was deprecated in API level 26.1.0. Use ACTION_POINTER_UP directly.

int ACTION_SCROLL

This constant was deprecated in API level 26.1.0. Use ACTION_SCROLL directly.

int AXIS_BRAKE

This constant was deprecated in API level 26.1.0. Use AXIS_BRAKE directly.

int AXIS_DISTANCE

This constant was deprecated in API level 26.1.0. Use AXIS_DISTANCE directly.

int AXIS_GAS

This constant was deprecated in API level 26.1.0. Use AXIS_GAS directly.

int AXIS_GENERIC_1

This constant was deprecated in API level 26.1.0. Use AXIS_GENERIC_1 directly.

int AXIS_GENERIC_10

This constant was deprecated in API level 26.1.0. Use AXIS_GENERIC_10 directly.

int AXIS_GENERIC_11

This constant was deprecated in API level 26.1.0. Use AXIS_GENERIC_11 directly.

int AXIS_GENERIC_12

This constant was deprecated in API level 26.1.0. Use AXIS_GENERIC_12 directly.

int AXIS_GENERIC_13

This constant was deprecated in API level 26.1.0. Use AXIS_GENERIC_13 directly.

int AXIS_GENERIC_14

This constant was deprecated in API level 26.1.0. Use AXIS_GENERIC_14 directly.

int AXIS_GENERIC_15

This constant was deprecated in API level 26.1.0. Use AXIS_GENERIC_15 directly.

int AXIS_GENERIC_16

This constant was deprecated in API level 26.1.0. Use AXIS_GENERIC_16 directly.

int AXIS_GENERIC_2

This constant was deprecated in API level 26.1.0. Use AXIS_GENERIC_2 directly.

int AXIS_GENERIC_3

This constant was deprecated in API level 26.1.0. Use AXIS_GENERIC_3 directly.

int AXIS_GENERIC_4

This constant was deprecated in API level 26.1.0. Use AXIS_GENERIC_4 directly.

int AXIS_GENERIC_5

This constant was deprecated in API level 26.1.0. Use AXIS_GENERIC_5 directly.

int AXIS_GENERIC_6

This constant was deprecated in API level 26.1.0. Use AXIS_GENERIC_6 directly.

int AXIS_GENERIC_7

This constant was deprecated in API level 26.1.0. Use AXIS_GENERIC_7 directly.

int AXIS_GENERIC_8

This constant was deprecated in API level 26.1.0. Use AXIS_GENERIC_8 directly.

int AXIS_GENERIC_9

This constant was deprecated in API level 26.1.0. Use AXIS_GENERIC_9 directly.

int AXIS_HAT_X

This constant was deprecated in API level 26.1.0. Use AXIS_HAT_X directly.

int AXIS_HAT_Y

This constant was deprecated in API level 26.1.0. Use AXIS_HAT_Y directly.

int AXIS_HSCROLL

This constant was deprecated in API level 26.1.0. Use AXIS_HSCROLL directly.

int AXIS_LTRIGGER

This constant was deprecated in API level 26.1.0. Use AXIS_LTRIGGER directly.

int AXIS_ORIENTATION

This constant was deprecated in API level 26.1.0. Use AXIS_ORIENTATION directly.

int AXIS_PRESSURE

This constant was deprecated in API level 26.1.0. Use AXIS_PRESSURE directly.

int AXIS_RELATIVE_X

Synonym for AXIS_RELATIVE_X.

int AXIS_RELATIVE_Y

Synonym for AXIS_RELATIVE_Y.

int AXIS_RTRIGGER

This constant was deprecated in API level 26.1.0. Use AXIS_RTRIGGER directly.

int AXIS_RUDDER

This constant was deprecated in API level 26.1.0. Use AXIS_RUDDER directly.

int AXIS_RX

This constant was deprecated in API level 26.1.0. Use AXIS_RX directly.

int AXIS_RY

This constant was deprecated in API level 26.1.0. Use AXIS_RY directly.

int AXIS_RZ

This constant was deprecated in API level 26.1.0. Use AXIS_RZ directly.

int AXIS_SCROLL

Synonym for AXIS_SCROLL.

int AXIS_SIZE

This constant was deprecated in API level 26.1.0. Use AXIS_SIZE directly.

int AXIS_THROTTLE

This constant was deprecated in API level 26.1.0. Use AXIS_THROTTLE directly.

int AXIS_TILT

This constant was deprecated in API level 26.1.0. Use AXIS_TILT directly.

int AXIS_TOOL_MAJOR

This constant was deprecated in API level 26.1.0. Use AXIS_TOOL_MAJOR directly.

int AXIS_TOOL_MINOR

This constant was deprecated in API level 26.1.0. Use AXIS_TOOL_MINOR directly.

int AXIS_TOUCH_MAJOR

This constant was deprecated in API level 26.1.0. Use AXIS_TOUCH_MAJOR directly.

int AXIS_TOUCH_MINOR

This constant was deprecated in API level 26.1.0. Use AXIS_TOUCH_MINOR directly.

int AXIS_VSCROLL

This constant was deprecated in API level 26.1.0. Use AXIS_VSCROLL directly.

int AXIS_WHEEL

This constant was deprecated in API level 26.1.0. Use AXIS_WHEEL directly.

int AXIS_X

This constant was deprecated in API level 26.1.0. Use AXIS_X directly.

int AXIS_Y

This constant was deprecated in API level 26.1.0. Use AXIS_Y directly.

int AXIS_Z

This constant was deprecated in API level 26.1.0. Use AXIS_Z directly.

int BUTTON_PRIMARY

This constant was deprecated in API level 26.1.0. Use BUTTON_PRIMARY directly.

Public methods

static int findPointerIndex(MotionEvent event, int pointerId)

This method was deprecated in API level 25.1.0. Call findPointerIndex(int) directly. This method will be removed in a future release.

static int getActionIndex(MotionEvent event)

This method was deprecated in API level 26.1.0. Call getActionIndex() directly. This method will be removed in a future release.

static int getActionMasked(MotionEvent event)

This method was deprecated in API level 26.1.0. Call getAction() directly. This method will be removed in a future release.

static float getAxisValue(MotionEvent event, int axis)

This method was deprecated in API level 26.1.0. Call getAxisValue(int) directly. This method will be removed in a future release.

static float getAxisValue(MotionEvent event, int axis, int pointerIndex)

This method was deprecated in API level 26.1.0. Call getAxisValue(int, int) directly. This method will be removed in a future release.

static int getButtonState(MotionEvent event)

This method was deprecated in API level 26.1.0. Call getButtonState() directly. This method will be removed in a future release.

static int getPointerCount(MotionEvent event)

This method was deprecated in API level 25.1.0. Call getPointerCount() directly. This method will be removed in a future release.

static int getPointerId(MotionEvent event, int pointerIndex)

This method was deprecated in API level 25.1.0. Call getPointerId(int) directly. This method will be removed in a future release.

static int getSource(MotionEvent event)

This method was deprecated in API level 25.1.0. Call getSource() directly. This method will be removed in a future release.

static float getX(MotionEvent event, int pointerIndex)

This method was deprecated in API level 25.1.0. Call getX() directly. This method will be removed in a future release.

static float getY(MotionEvent event, int pointerIndex)

This method was deprecated in API level 25.1.0. Call getY() directly. This method will be removed in a future release.

static boolean isFromSource(MotionEvent event, int source)

Determines whether the event is from the given source.

Inherited methods