# MotionEventCompat

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1  
Summary:[Constants](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#constants)\|[Methods](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#)  

# MotionEventCompat

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public

final

class
MotionEventCompat
`  
`

extends Object


``


`

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

<br />

*** ** * ** ***

Helper for accessing features in[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html).

## Summary

|                                                                                                                                                                  ### Constants                                                                                                                                                                   ||
|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [ACTION_HOVER_ENTER](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#ACTION_HOVER_ENTER) *This constant was deprecated in API level 26.1.0. Use[ACTION_HOVER_ENTER](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_HOVER_ENTER)directly.*                                 |
| `int` | [ACTION_HOVER_EXIT](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#ACTION_HOVER_EXIT) *This constant was deprecated in API level 26.1.0. Use[ACTION_HOVER_EXIT](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_HOVER_EXIT)directly.*                                     |
| `int` | [ACTION_HOVER_MOVE](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#ACTION_HOVER_MOVE) *This constant was deprecated in API level 26.1.0. Use[ACTION_HOVER_MOVE](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_HOVER_MOVE)directly.*                                     |
| `int` | [ACTION_MASK](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#ACTION_MASK) *This constant was deprecated in API level 26.1.0. Use[ACTION_MASK](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_MASK)directly.*                                                             |
| `int` | [ACTION_POINTER_DOWN](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#ACTION_POINTER_DOWN) *This constant was deprecated in API level 26.1.0. Use[ACTION_POINTER_DOWN](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_POINTER_DOWN)directly.*                             |
| `int` | [ACTION_POINTER_INDEX_MASK](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#ACTION_POINTER_INDEX_MASK) *This constant was deprecated in API level 26.1.0. Use[ACTION_POINTER_INDEX_MASK](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_POINTER_INDEX_MASK)directly.*     |
| `int` | [ACTION_POINTER_INDEX_SHIFT](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#ACTION_POINTER_INDEX_SHIFT) *This constant was deprecated in API level 26.1.0. Use[ACTION_POINTER_INDEX_SHIFT](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_POINTER_INDEX_SHIFT)directly.* |
| `int` | [ACTION_POINTER_UP](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#ACTION_POINTER_UP) *This constant was deprecated in API level 26.1.0. Use[ACTION_POINTER_UP](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_POINTER_UP)directly.*                                     |
| `int` | [ACTION_SCROLL](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#ACTION_SCROLL) *This constant was deprecated in API level 26.1.0. Use[ACTION_SCROLL](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_SCROLL)directly.*                                                     |
| `int` | [AXIS_BRAKE](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_BRAKE) *This constant was deprecated in API level 26.1.0. Use[AXIS_BRAKE](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_BRAKE)directly.*                                                                 |
| `int` | [AXIS_DISTANCE](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_DISTANCE) *This constant was deprecated in API level 26.1.0. Use[AXIS_DISTANCE](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_DISTANCE)directly.*                                                     |
| `int` | [AXIS_GAS](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_GAS) *This constant was deprecated in API level 26.1.0. Use[AXIS_GAS](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GAS)directly.*                                                                         |
| `int` | [AXIS_GENERIC_1](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_GENERIC_1) *This constant was deprecated in API level 26.1.0. Use[AXIS_GENERIC_1](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_1)directly.*                                                 |
| `int` | [AXIS_GENERIC_10](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_GENERIC_10) *This constant was deprecated in API level 26.1.0. Use[AXIS_GENERIC_10](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_10)directly.*                                             |
| `int` | [AXIS_GENERIC_11](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_GENERIC_11) *This constant was deprecated in API level 26.1.0. Use[AXIS_GENERIC_11](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_11)directly.*                                             |
| `int` | [AXIS_GENERIC_12](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_GENERIC_12) *This constant was deprecated in API level 26.1.0. Use[AXIS_GENERIC_12](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_12)directly.*                                             |
| `int` | [AXIS_GENERIC_13](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_GENERIC_13) *This constant was deprecated in API level 26.1.0. Use[AXIS_GENERIC_13](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_13)directly.*                                             |
| `int` | [AXIS_GENERIC_14](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_GENERIC_14) *This constant was deprecated in API level 26.1.0. Use[AXIS_GENERIC_14](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_14)directly.*                                             |
| `int` | [AXIS_GENERIC_15](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_GENERIC_15) *This constant was deprecated in API level 26.1.0. Use[AXIS_GENERIC_15](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_15)directly.*                                             |
| `int` | [AXIS_GENERIC_16](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_GENERIC_16) *This constant was deprecated in API level 26.1.0. Use[AXIS_GENERIC_16](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_16)directly.*                                             |
| `int` | [AXIS_GENERIC_2](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_GENERIC_2) *This constant was deprecated in API level 26.1.0. Use[AXIS_GENERIC_2](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_2)directly.*                                                 |
| `int` | [AXIS_GENERIC_3](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_GENERIC_3) *This constant was deprecated in API level 26.1.0. Use[AXIS_GENERIC_3](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_3)directly.*                                                 |
| `int` | [AXIS_GENERIC_4](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_GENERIC_4) *This constant was deprecated in API level 26.1.0. Use[AXIS_GENERIC_4](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_4)directly.*                                                 |
| `int` | [AXIS_GENERIC_5](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_GENERIC_5) *This constant was deprecated in API level 26.1.0. Use[AXIS_GENERIC_5](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_5)directly.*                                                 |
| `int` | [AXIS_GENERIC_6](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_GENERIC_6) *This constant was deprecated in API level 26.1.0. Use[AXIS_GENERIC_6](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_6)directly.*                                                 |
| `int` | [AXIS_GENERIC_7](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_GENERIC_7) *This constant was deprecated in API level 26.1.0. Use[AXIS_GENERIC_7](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_7)directly.*                                                 |
| `int` | [AXIS_GENERIC_8](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_GENERIC_8) *This constant was deprecated in API level 26.1.0. Use[AXIS_GENERIC_8](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_8)directly.*                                                 |
| `int` | [AXIS_GENERIC_9](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_GENERIC_9) *This constant was deprecated in API level 26.1.0. Use[AXIS_GENERIC_9](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_9)directly.*                                                 |
| `int` | [AXIS_HAT_X](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_HAT_X) *This constant was deprecated in API level 26.1.0. Use[AXIS_HAT_X](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HAT_X)directly.*                                                                 |
| `int` | [AXIS_HAT_Y](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_HAT_Y) *This constant was deprecated in API level 26.1.0. Use[AXIS_HAT_Y](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HAT_Y)directly.*                                                                 |
| `int` | [AXIS_HSCROLL](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_HSCROLL) *This constant was deprecated in API level 26.1.0. Use[AXIS_HSCROLL](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HSCROLL)directly.*                                                         |
| `int` | [AXIS_LTRIGGER](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_LTRIGGER) *This constant was deprecated in API level 26.1.0. Use[AXIS_LTRIGGER](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_LTRIGGER)directly.*                                                     |
| `int` | [AXIS_ORIENTATION](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_ORIENTATION) *This constant was deprecated in API level 26.1.0. Use[AXIS_ORIENTATION](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_ORIENTATION)directly.*                                         |
| `int` | [AXIS_PRESSURE](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_PRESSURE) *This constant was deprecated in API level 26.1.0. Use[AXIS_PRESSURE](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_PRESSURE)directly.*                                                     |
| `int` | [AXIS_RELATIVE_X](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_RELATIVE_X) Synonym for[AXIS_RELATIVE_X](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_RELATIVE_X).                                                                                                 |
| `int` | [AXIS_RELATIVE_Y](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_RELATIVE_Y) Synonym for[AXIS_RELATIVE_Y](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_RELATIVE_Y).                                                                                                 |
| `int` | [AXIS_RTRIGGER](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_RTRIGGER) *This constant was deprecated in API level 26.1.0. Use[AXIS_RTRIGGER](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_RTRIGGER)directly.*                                                     |
| `int` | [AXIS_RUDDER](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_RUDDER) *This constant was deprecated in API level 26.1.0. Use[AXIS_RUDDER](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_RUDDER)directly.*                                                             |
| `int` | [AXIS_RX](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_RX) *This constant was deprecated in API level 26.1.0. Use[AXIS_RX](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_RX)directly.*                                                                             |
| `int` | [AXIS_RY](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_RY) *This constant was deprecated in API level 26.1.0. Use[AXIS_RY](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_RY)directly.*                                                                             |
| `int` | [AXIS_RZ](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_RZ) *This constant was deprecated in API level 26.1.0. Use[AXIS_RZ](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_RZ)directly.*                                                                             |
| `int` | [AXIS_SCROLL](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_SCROLL) Synonym for[AXIS_SCROLL](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_SCROLL).                                                                                                                 |
| `int` | [AXIS_SIZE](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_SIZE) *This constant was deprecated in API level 26.1.0. Use[AXIS_SIZE](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_SIZE)directly.*                                                                     |
| `int` | [AXIS_THROTTLE](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_THROTTLE) *This constant was deprecated in API level 26.1.0. Use[AXIS_THROTTLE](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_THROTTLE)directly.*                                                     |
| `int` | [AXIS_TILT](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_TILT) *This constant was deprecated in API level 26.1.0. Use[AXIS_TILT](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_TILT)directly.*                                                                     |
| `int` | [AXIS_TOOL_MAJOR](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_TOOL_MAJOR) *This constant was deprecated in API level 26.1.0. Use[AXIS_TOOL_MAJOR](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_TOOL_MAJOR)directly.*                                             |
| `int` | [AXIS_TOOL_MINOR](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_TOOL_MINOR) *This constant was deprecated in API level 26.1.0. Use[AXIS_TOOL_MINOR](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_TOOL_MINOR)directly.*                                             |
| `int` | [AXIS_TOUCH_MAJOR](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_TOUCH_MAJOR) *This constant was deprecated in API level 26.1.0. Use[AXIS_TOUCH_MAJOR](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_TOUCH_MAJOR)directly.*                                         |
| `int` | [AXIS_TOUCH_MINOR](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_TOUCH_MINOR) *This constant was deprecated in API level 26.1.0. Use[AXIS_TOUCH_MINOR](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_TOUCH_MINOR)directly.*                                         |
| `int` | [AXIS_VSCROLL](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_VSCROLL) *This constant was deprecated in API level 26.1.0. Use[AXIS_VSCROLL](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_VSCROLL)directly.*                                                         |
| `int` | [AXIS_WHEEL](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_WHEEL) *This constant was deprecated in API level 26.1.0. Use[AXIS_WHEEL](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_WHEEL)directly.*                                                                 |
| `int` | [AXIS_X](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_X) *This constant was deprecated in API level 26.1.0. Use[AXIS_X](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_X)directly.*                                                                                 |
| `int` | [AXIS_Y](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_Y) *This constant was deprecated in API level 26.1.0. Use[AXIS_Y](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Y)directly.*                                                                                 |
| `int` | [AXIS_Z](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_Z) *This constant was deprecated in API level 26.1.0. Use[AXIS_Z](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Z)directly.*                                                                                 |
| `int` | [BUTTON_PRIMARY](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#BUTTON_PRIMARY) *This constant was deprecated in API level 26.1.0. Use[BUTTON_PRIMARY](https://developer.android.com/reference/android/view/MotionEvent.html#BUTTON_PRIMARY)directly.*                                                 |

|                                                                                                                                                                                                                                                              ### Public methods                                                                                                                                                                                                                                                              ||
|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static int`     | ` `[findPointerIndex](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#findPointerIndex(android.view.MotionEvent, int))`(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` event, int pointerId) ` *This method was deprecated in API level 25.1.0. Call[findPointerIndex(int)](https://developer.android.com/reference/android/view/MotionEvent.html#findPointerIndex(int))directly. This method will be removed in a future release.*             |
| ` static int`     | ` `[getActionIndex](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#getActionIndex(android.view.MotionEvent))`(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` event) ` *This method was deprecated in API level 26.1.0. Call[getActionIndex()](https://developer.android.com/reference/android/view/MotionEvent.html#getActionIndex())directly. This method will be removed in a future release.*                                               |
| ` static int`     | ` `[getActionMasked](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#getActionMasked(android.view.MotionEvent))`(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` event) ` *This method was deprecated in API level 26.1.0. Call[getAction()](https://developer.android.com/reference/android/view/MotionEvent.html#getAction())directly. This method will be removed in a future release.*                                                       |
| ` static float`   | ` `[getAxisValue](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#getAxisValue(android.view.MotionEvent, int))`(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` event, int axis) ` *This method was deprecated in API level 26.1.0. Call[getAxisValue(int)](https://developer.android.com/reference/android/view/MotionEvent.html#getAxisValue(int))directly. This method will be removed in a future release.*                                  |
| ` static float`   | ` `[getAxisValue](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#getAxisValue(android.view.MotionEvent, int, int))`(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` event, int axis, int pointerIndex) ` *This method was deprecated in API level 26.1.0. Call[getAxisValue(int, int)](https://developer.android.com/reference/android/view/MotionEvent.html#getAxisValue(int, int))directly. This method will be removed in a future release.* |
| ` static int`     | ` `[getButtonState](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#getButtonState(android.view.MotionEvent))`(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` event) ` *This method was deprecated in API level 26.1.0. Call[getButtonState()](https://developer.android.com/reference/android/view/MotionEvent.html#getButtonState())directly. This method will be removed in a future release.*                                               |
| ` static int`     | ` `[getPointerCount](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#getPointerCount(android.view.MotionEvent))`(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` event) ` *This method was deprecated in API level 25.1.0. Call[getPointerCount()](https://developer.android.com/reference/android/view/MotionEvent.html#getPointerCount())directly. This method will be removed in a future release.*                                           |
| ` static int`     | ` `[getPointerId](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#getPointerId(android.view.MotionEvent, int))`(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` event, int pointerIndex) ` *This method was deprecated in API level 25.1.0. Call[getPointerId(int)](https://developer.android.com/reference/android/view/MotionEvent.html#getPointerId(int))directly. This method will be removed in a future release.*                          |
| ` static int`     | ` `[getSource](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#getSource(android.view.MotionEvent))`(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` event) ` *This method was deprecated in API level 25.1.0. Call[getSource()](https://developer.android.com/reference/android/view/MotionEvent.html#getSource())directly. This method will be removed in a future release.*                                                                   |
| ` static float`   | ` `[getX](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#getX(android.view.MotionEvent, int))`(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` event, int pointerIndex) ` *This method was deprecated in API level 25.1.0. Call[getX()](https://developer.android.com/reference/android/view/MotionEvent.html#getX())directly. This method will be removed in a future release.*                                                                |
| ` static float`   | ` `[getY](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#getY(android.view.MotionEvent, int))`(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` event, int pointerIndex) ` *This method was deprecated in API level 25.1.0. Call[getY()](https://developer.android.com/reference/android/view/MotionEvent.html#getY())directly. This method will be removed in a future release.*                                                                |
| ` static boolean` | ` `[isFromSource](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#isFromSource(android.view.MotionEvent, int))`(`[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent.html)` event, int source) ` Determines whether the event is from the given source.                                                                                                                                                                                                      |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Constants

### ACTION_HOVER_ENTER

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int ACTION_HOVER_ENTER
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[ACTION_HOVER_ENTER](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_HOVER_ENTER)directly.

Synonym for[ACTION_HOVER_ENTER](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_HOVER_ENTER).

<br />

Constant Value: 9 (0x00000009)  

### ACTION_HOVER_EXIT

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int ACTION_HOVER_EXIT
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[ACTION_HOVER_EXIT](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_HOVER_EXIT)directly.

Synonym for[ACTION_HOVER_EXIT](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_HOVER_EXIT).

<br />

Constant Value: 10 (0x0000000a)  

### ACTION_HOVER_MOVE

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int ACTION_HOVER_MOVE
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[ACTION_HOVER_MOVE](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_HOVER_MOVE)directly.

Synonym for[ACTION_HOVER_MOVE](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_HOVER_MOVE).

<br />

Constant Value: 7 (0x00000007)  

### ACTION_MASK

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int ACTION_MASK
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[ACTION_MASK](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_MASK)directly.

Synonym for[ACTION_MASK](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_MASK).

<br />

Constant Value: 255 (0x000000ff)  

### ACTION_POINTER_DOWN

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int ACTION_POINTER_DOWN
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[ACTION_POINTER_DOWN](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_POINTER_DOWN)directly.

Synonym for[ACTION_POINTER_DOWN](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_POINTER_DOWN).

<br />

Constant Value: 5 (0x00000005)  

### ACTION_POINTER_INDEX_MASK

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int ACTION_POINTER_INDEX_MASK
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[ACTION_POINTER_INDEX_MASK](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_POINTER_INDEX_MASK)directly.

Synonym for[ACTION_POINTER_INDEX_MASK](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_POINTER_INDEX_MASK).

<br />

Constant Value: 65280 (0x0000ff00)  

### ACTION_POINTER_INDEX_SHIFT

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int ACTION_POINTER_INDEX_SHIFT
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[ACTION_POINTER_INDEX_SHIFT](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_POINTER_INDEX_SHIFT)directly.

Synonym for[ACTION_POINTER_INDEX_SHIFT](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_POINTER_INDEX_SHIFT).

<br />

Constant Value: 8 (0x00000008)  

### ACTION_POINTER_UP

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int ACTION_POINTER_UP
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[ACTION_POINTER_UP](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_POINTER_UP)directly.

Synonym for[ACTION_POINTER_UP](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_POINTER_UP).

<br />

Constant Value: 6 (0x00000006)  

### ACTION_SCROLL

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int ACTION_SCROLL
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[ACTION_SCROLL](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_SCROLL)directly.

Synonym for[ACTION_SCROLL](https://developer.android.com/reference/android/view/MotionEvent.html#ACTION_SCROLL).

<br />

Constant Value: 8 (0x00000008)  

### AXIS_BRAKE

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_BRAKE
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_BRAKE](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_BRAKE)directly.

Synonym for[AXIS_BRAKE](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_BRAKE).

<br />

Constant Value: 23 (0x00000017)  

### AXIS_DISTANCE

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_DISTANCE
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_DISTANCE](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_DISTANCE)directly.

Synonym for[AXIS_DISTANCE](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_DISTANCE).

<br />

Constant Value: 24 (0x00000018)  

### AXIS_GAS

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_GAS
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_GAS](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GAS)directly.

Synonym for[AXIS_GAS](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GAS).

<br />

Constant Value: 22 (0x00000016)  

### AXIS_GENERIC_1

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_GENERIC_1
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_GENERIC_1](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_1)directly.

Synonym for[AXIS_GENERIC_1](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_1).

<br />

Constant Value: 32 (0x00000020)  

### AXIS_GENERIC_10

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_GENERIC_10
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_GENERIC_10](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_10)directly.

Synonym for[AXIS_GENERIC_10](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_10).

<br />

Constant Value: 41 (0x00000029)  

### AXIS_GENERIC_11

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_GENERIC_11
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_GENERIC_11](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_11)directly.

Synonym for[AXIS_GENERIC_11](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_11).

<br />

Constant Value: 42 (0x0000002a)  

### AXIS_GENERIC_12

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_GENERIC_12
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_GENERIC_12](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_12)directly.

Synonym for[AXIS_GENERIC_12](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_12).

<br />

Constant Value: 43 (0x0000002b)  

### AXIS_GENERIC_13

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_GENERIC_13
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_GENERIC_13](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_13)directly.

Synonym for[AXIS_GENERIC_13](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_13).

<br />

Constant Value: 44 (0x0000002c)  

### AXIS_GENERIC_14

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_GENERIC_14
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_GENERIC_14](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_14)directly.

Synonym for[AXIS_GENERIC_14](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_14).

<br />

Constant Value: 45 (0x0000002d)  

### AXIS_GENERIC_15

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_GENERIC_15
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_GENERIC_15](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_15)directly.

Synonym for[AXIS_GENERIC_15](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_15).

<br />

Constant Value: 46 (0x0000002e)  

### AXIS_GENERIC_16

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_GENERIC_16
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_GENERIC_16](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_16)directly.

Synonym for[AXIS_GENERIC_16](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_16).

<br />

Constant Value: 47 (0x0000002f)  

### AXIS_GENERIC_2

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_GENERIC_2
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_GENERIC_2](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_2)directly.

Synonym for[AXIS_GENERIC_2](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_2).

<br />

Constant Value: 33 (0x00000021)  

### AXIS_GENERIC_3

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_GENERIC_3
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_GENERIC_3](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_3)directly.

Synonym for[AXIS_GENERIC_3](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_3).

<br />

Constant Value: 34 (0x00000022)  

### AXIS_GENERIC_4

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_GENERIC_4
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_GENERIC_4](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_4)directly.

Synonym for[AXIS_GENERIC_4](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_4).

<br />

Constant Value: 35 (0x00000023)  

### AXIS_GENERIC_5

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_GENERIC_5
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_GENERIC_5](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_5)directly.

Synonym for[AXIS_GENERIC_5](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_5).

<br />

Constant Value: 36 (0x00000024)  

### AXIS_GENERIC_6

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_GENERIC_6
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_GENERIC_6](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_6)directly.

Synonym for[AXIS_GENERIC_6](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_6).

<br />

Constant Value: 37 (0x00000025)  

### AXIS_GENERIC_7

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_GENERIC_7
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_GENERIC_7](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_7)directly.

Synonym for[AXIS_GENERIC_7](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_7).

<br />

Constant Value: 38 (0x00000026)  

### AXIS_GENERIC_8

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_GENERIC_8
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_GENERIC_8](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_8)directly.

Synonym for[AXIS_GENERIC_8](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_8).

<br />

Constant Value: 39 (0x00000027)  

### AXIS_GENERIC_9

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_GENERIC_9
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_GENERIC_9](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_9)directly.

Synonym for[AXIS_GENERIC_9](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_GENERIC_9).

<br />

Constant Value: 40 (0x00000028)  

### AXIS_HAT_X

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_HAT_X
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_HAT_X](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HAT_X)directly.

Synonym for[AXIS_HAT_X](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HAT_X).

<br />

Constant Value: 15 (0x0000000f)  

### AXIS_HAT_Y

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_HAT_Y
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_HAT_Y](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HAT_Y)directly.

Synonym for[AXIS_HAT_Y](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HAT_Y).

<br />

Constant Value: 16 (0x00000010)  

### AXIS_HSCROLL

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_HSCROLL
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_HSCROLL](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HSCROLL)directly.

Synonym for[AXIS_HSCROLL](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HSCROLL).

<br />

Constant Value: 10 (0x0000000a)  

### AXIS_LTRIGGER

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_LTRIGGER
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_LTRIGGER](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_LTRIGGER)directly.

Synonym for[AXIS_LTRIGGER](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_LTRIGGER).

<br />

Constant Value: 17 (0x00000011)  

### AXIS_ORIENTATION

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_ORIENTATION
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_ORIENTATION](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_ORIENTATION)directly.

Synonym for[AXIS_ORIENTATION](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_ORIENTATION).

<br />

Constant Value: 8 (0x00000008)  

### AXIS_PRESSURE

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_PRESSURE
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_PRESSURE](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_PRESSURE)directly.

Synonym for[AXIS_PRESSURE](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_PRESSURE).

<br />

Constant Value: 2 (0x00000002)  

### AXIS_RELATIVE_X

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_RELATIVE_X
```

Synonym for[AXIS_RELATIVE_X](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_RELATIVE_X).

<br />

Constant Value: 27 (0x0000001b)  

### AXIS_RELATIVE_Y

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_RELATIVE_Y
```

Synonym for[AXIS_RELATIVE_Y](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_RELATIVE_Y).

<br />

Constant Value: 28 (0x0000001c)  

### AXIS_RTRIGGER

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_RTRIGGER
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_RTRIGGER](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_RTRIGGER)directly.

Synonym for[AXIS_RTRIGGER](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_RTRIGGER).

<br />

Constant Value: 18 (0x00000012)  

### AXIS_RUDDER

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_RUDDER
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_RUDDER](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_RUDDER)directly.

Synonym for[AXIS_RUDDER](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_RUDDER).

<br />

Constant Value: 20 (0x00000014)  

### AXIS_RX

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_RX
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_RX](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_RX)directly.

Synonym for[AXIS_RX](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_RX).

<br />

Constant Value: 12 (0x0000000c)  

### AXIS_RY

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_RY
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_RY](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_RY)directly.

Synonym for[AXIS_RY](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_RY).

<br />

Constant Value: 13 (0x0000000d)  

### AXIS_RZ

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_RZ
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_RZ](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_RZ)directly.

Synonym for[AXIS_RZ](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_RZ).

<br />

Constant Value: 14 (0x0000000e)  

### AXIS_SCROLL

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_SCROLL
```

Synonym for[AXIS_SCROLL](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_SCROLL).

<br />

Constant Value: 26 (0x0000001a)  

### AXIS_SIZE

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_SIZE
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_SIZE](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_SIZE)directly.

Synonym for[AXIS_SIZE](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_SIZE).

<br />

Constant Value: 3 (0x00000003)  

### AXIS_THROTTLE

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_THROTTLE
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_THROTTLE](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_THROTTLE)directly.

Synonym for[AXIS_THROTTLE](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_THROTTLE).

<br />

Constant Value: 19 (0x00000013)  

### AXIS_TILT

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_TILT
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_TILT](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_TILT)directly.

Synonym for[AXIS_TILT](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_TILT).

<br />

Constant Value: 25 (0x00000019)  

### AXIS_TOOL_MAJOR

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_TOOL_MAJOR
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_TOOL_MAJOR](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_TOOL_MAJOR)directly.

Synonym for[AXIS_TOOL_MAJOR](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_TOOL_MAJOR).

<br />

Constant Value: 6 (0x00000006)  

### AXIS_TOOL_MINOR

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_TOOL_MINOR
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_TOOL_MINOR](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_TOOL_MINOR)directly.

Synonym for[AXIS_TOOL_MINOR](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_TOOL_MINOR).

<br />

Constant Value: 7 (0x00000007)  

### AXIS_TOUCH_MAJOR

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_TOUCH_MAJOR
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_TOUCH_MAJOR](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_TOUCH_MAJOR)directly.

Synonym for[AXIS_TOUCH_MAJOR](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_TOUCH_MAJOR).

<br />

Constant Value: 4 (0x00000004)  

### AXIS_TOUCH_MINOR

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_TOUCH_MINOR
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_TOUCH_MINOR](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_TOUCH_MINOR)directly.

Synonym for[AXIS_TOUCH_MINOR](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_TOUCH_MINOR).

<br />

Constant Value: 5 (0x00000005)  

### AXIS_VSCROLL

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_VSCROLL
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_VSCROLL](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_VSCROLL)directly.

Synonym for[AXIS_VSCROLL](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_VSCROLL).

<br />

Constant Value: 9 (0x00000009)  

### AXIS_WHEEL

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_WHEEL
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_WHEEL](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_WHEEL)directly.

Synonym for[AXIS_WHEEL](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_WHEEL).

<br />

Constant Value: 21 (0x00000015)  

### AXIS_X

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_X
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_X](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_X)directly.

Synonym for[AXIS_X](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_X).

<br />

Constant Value: 0 (0x00000000)  

### AXIS_Y

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_Y
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_Y](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Y)directly.

Synonym for[AXIS_Y](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Y).

<br />

Constant Value: 1 (0x00000001)  

### AXIS_Z

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int AXIS_Z
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[AXIS_Z](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Z)directly.

Synonym for[AXIS_Z](https://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Z).

<br />

Constant Value: 11 (0x0000000b)  

### BUTTON_PRIMARY

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int BUTTON_PRIMARY
```

<br />

**This constant was deprecated in API level 26.1.0.**   
Use[BUTTON_PRIMARY](https://developer.android.com/reference/android/view/MotionEvent.html#BUTTON_PRIMARY)directly.

Synonym for[BUTTON_PRIMARY](https://developer.android.com/reference/android/view/MotionEvent.html#BUTTON_PRIMARY).

<br />

Constant Value: 1 (0x00000001)

## Public methods

### findPointerIndex

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int findPointerIndex (MotionEvent event, 
                int pointerId)
```

<br />

**This method was deprecated in API level 25.1.0.**   
Call[findPointerIndex(int)](https://developer.android.com/reference/android/view/MotionEvent.html#findPointerIndex(int))directly. This method will be removed in a future release.

Call[findPointerIndex(int)](https://developer.android.com/reference/android/view/MotionEvent.html#findPointerIndex(int)).

<br />

|            Parameters             ||
|-------------|----------------------|
| `event`     | `MotionEvent` <br /> |
| `pointerId` | `int` <br />         |

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getActionIndex

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getActionIndex (MotionEvent event)
```

<br />

**This method was deprecated in API level 26.1.0.**   
Call[getActionIndex()](https://developer.android.com/reference/android/view/MotionEvent.html#getActionIndex())directly. This method will be removed in a future release.

Call[getAction()](https://developer.android.com/reference/android/view/MotionEvent.html#getAction()), returning only the pointer index portion.

<br />

|          Parameters           ||
|---------|----------------------|
| `event` | `MotionEvent` <br /> |

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getActionMasked

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getActionMasked (MotionEvent event)
```

<br />

**This method was deprecated in API level 26.1.0.**   
Call[getAction()](https://developer.android.com/reference/android/view/MotionEvent.html#getAction())directly. This method will be removed in a future release.

Call[getAction()](https://developer.android.com/reference/android/view/MotionEvent.html#getAction()), returning only the[ACTION_MASK](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#ACTION_MASK)portion.

<br />

|          Parameters           ||
|---------|----------------------|
| `event` | `MotionEvent` <br /> |

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getAxisValue

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float getAxisValue (MotionEvent event, 
                int axis)
```

<br />

**This method was deprecated in API level 26.1.0.**   
Call[getAxisValue(int)](https://developer.android.com/reference/android/view/MotionEvent.html#getAxisValue(int))directly. This method will be removed in a future release.

Get axis value for the first pointer index (may be an arbitrary pointer identifier).

<br />

|                                 Parameters                                 ||
|---------|-------------------------------------------------------------------|
| `event` | `MotionEvent` <br />                                              |
| `axis`  | `int`: The axis identifier for the axis value to retrieve. <br /> |

|     Returns     ||
|---------|--------|
| `float` | <br /> |

**See also:**

- [AXIS_X](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_X)
- [AXIS_Y](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_Y)  

### getAxisValue

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

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

<br />

**This method was deprecated in API level 26.1.0.**   
Call[getAxisValue(int, int)](https://developer.android.com/reference/android/view/MotionEvent.html#getAxisValue(int, int))directly. This method will be removed in a future release.

Returns the value of the requested axis for the given pointer*index* (use[getPointerId(MotionEvent, int)](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#getPointerId(android.view.MotionEvent, int))to find the pointer identifier for this index).

<br />

|                                                                                                                                      Parameters                                                                                                                                       ||
|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `event`        | `MotionEvent` <br />                                                                                                                                                                                                                                                  |
| `axis`         | `int`: The axis identifier for the axis value to retrieve. <br />                                                                                                                                                                                                     |
| `pointerIndex` | `int`: Raw index of pointer to retrieve. Value may be from 0 (the first pointer that is down) to[getPointerCount(MotionEvent)](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#getPointerCount(android.view.MotionEvent))-1. <br /> |

|                                  Returns                                  ||
|---------|------------------------------------------------------------------|
| `float` | The value of the axis, or 0 if the axis is not available. <br /> |

**See also:**

- [AXIS_X](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_X)
- [AXIS_Y](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat#AXIS_Y)  

### getButtonState

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getButtonState (MotionEvent event)
```

<br />

**This method was deprecated in API level 26.1.0.**   
Call[getButtonState()](https://developer.android.com/reference/android/view/MotionEvent.html#getButtonState())directly. This method will be removed in a future release.

<br />

<br />

|          Parameters           ||
|---------|----------------------|
| `event` | `MotionEvent` <br /> |

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getPointerCount

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getPointerCount (MotionEvent event)
```

<br />

**This method was deprecated in API level 25.1.0.**   
Call[getPointerCount()](https://developer.android.com/reference/android/view/MotionEvent.html#getPointerCount())directly. This method will be removed in a future release.

The number of pointers of data contained in this event. Always

<br />

|          Parameters           ||
|---------|----------------------|
| `event` | `MotionEvent` <br /> |

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getPointerId

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getPointerId (MotionEvent event, 
                int pointerIndex)
```

<br />

**This method was deprecated in API level 25.1.0.**   
Call[getPointerId(int)](https://developer.android.com/reference/android/view/MotionEvent.html#getPointerId(int))directly. This method will be removed in a future release.

Call[getPointerId(int)](https://developer.android.com/reference/android/view/MotionEvent.html#getPointerId(int)).

<br />

|              Parameters              ||
|----------------|----------------------|
| `event`        | `MotionEvent` <br /> |
| `pointerIndex` | `int` <br />         |

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getSource

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getSource (MotionEvent event)
```

<br />

**This method was deprecated in API level 25.1.0.**   
Call[getSource()](https://developer.android.com/reference/android/view/MotionEvent.html#getSource())directly. This method will be removed in a future release.

Gets the source of the event.

<br />

|          Parameters           ||
|---------|----------------------|
| `event` | `MotionEvent` <br /> |

|                                                                            Returns                                                                             ||
|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | The event source or[SOURCE_UNKNOWN](https://developer.android.com/reference/android/support/v4/view/InputDeviceCompat#SOURCE_UNKNOWN)if unknown. <br /> |

### getX

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float getX (MotionEvent event, 
                int pointerIndex)
```

<br />

**This method was deprecated in API level 25.1.0.**   
Call[getX()](https://developer.android.com/reference/android/view/MotionEvent.html#getX())directly. This method will be removed in a future release.

Call[getX(int)](https://developer.android.com/reference/android/view/MotionEvent.html#getX(int)).

<br />

|              Parameters              ||
|----------------|----------------------|
| `event`        | `MotionEvent` <br /> |
| `pointerIndex` | `int` <br />         |

|     Returns     ||
|---------|--------|
| `float` | <br /> |

### getY

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float getY (MotionEvent event, 
                int pointerIndex)
```

<br />

**This method was deprecated in API level 25.1.0.**   
Call[getY()](https://developer.android.com/reference/android/view/MotionEvent.html#getY())directly. This method will be removed in a future release.

Call[getY(int)](https://developer.android.com/reference/android/view/MotionEvent.html#getY(int)).

<br />

|              Parameters              ||
|----------------|----------------------|
| `event`        | `MotionEvent` <br /> |
| `pointerIndex` | `int` <br />         |

|     Returns     ||
|---------|--------|
| `float` | <br /> |

### isFromSource

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean isFromSource (MotionEvent event, 
                int source)
```

Determines whether the event is from the given source.

<br />

|                         Parameters                         ||
|----------|--------------------------------------------------|
| `event`  | `MotionEvent` <br />                             |
| `source` | `int`: The input source to check against. <br /> |

|                            Returns                            ||
|-----------|----------------------------------------------------|
| `boolean` | Whether the event is from the given source. <br /> |

-

  ## Annotations

  - [ViewPager.DecorView](https://developer.android.com/reference/android/support/v4/view/ViewPager.DecorView)
-

  ## Interfaces

  - [ActionProvider.VisibilityListener](https://developer.android.com/reference/android/support/v4/view/ActionProvider.VisibilityListener)
  - [AsyncLayoutInflater.OnInflateFinishedListener](https://developer.android.com/reference/android/support/v4/view/AsyncLayoutInflater.OnInflateFinishedListener)
  - [LayoutInflaterFactory](https://developer.android.com/reference/android/support/v4/view/LayoutInflaterFactory)
  - [MenuItemCompat.OnActionExpandListener](https://developer.android.com/reference/android/support/v4/view/MenuItemCompat.OnActionExpandListener)
  - [NestedScrollingChild](https://developer.android.com/reference/android/support/v4/view/NestedScrollingChild)
  - [NestedScrollingChild2](https://developer.android.com/reference/android/support/v4/view/NestedScrollingChild2)
  - [NestedScrollingParent](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParent)
  - [NestedScrollingParent2](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParent2)
  - [OnApplyWindowInsetsListener](https://developer.android.com/reference/android/support/v4/view/OnApplyWindowInsetsListener)
  - [ScrollingView](https://developer.android.com/reference/android/support/v4/view/ScrollingView)
  - [TintableBackgroundView](https://developer.android.com/reference/android/support/v4/view/TintableBackgroundView)
  - [ViewPager.OnAdapterChangeListener](https://developer.android.com/reference/android/support/v4/view/ViewPager.OnAdapterChangeListener)
  - [ViewPager.OnPageChangeListener](https://developer.android.com/reference/android/support/v4/view/ViewPager.OnPageChangeListener)
  - [ViewPager.PageTransformer](https://developer.android.com/reference/android/support/v4/view/ViewPager.PageTransformer)
  - [ViewPropertyAnimatorListener](https://developer.android.com/reference/android/support/v4/view/ViewPropertyAnimatorListener)
  - [ViewPropertyAnimatorUpdateListener](https://developer.android.com/reference/android/support/v4/view/ViewPropertyAnimatorUpdateListener)
-

  ## Classes

  - [AbsSavedState](https://developer.android.com/reference/android/support/v4/view/AbsSavedState)
  - [AccessibilityDelegateCompat](https://developer.android.com/reference/android/support/v4/view/AccessibilityDelegateCompat)
  - [ActionProvider](https://developer.android.com/reference/android/support/v4/view/ActionProvider)
  - [AsyncLayoutInflater](https://developer.android.com/reference/android/support/v4/view/AsyncLayoutInflater)
  - [GestureDetectorCompat](https://developer.android.com/reference/android/support/v4/view/GestureDetectorCompat)
  - [GravityCompat](https://developer.android.com/reference/android/support/v4/view/GravityCompat)
  - [InputDeviceCompat](https://developer.android.com/reference/android/support/v4/view/InputDeviceCompat)
  - [LayoutInflaterCompat](https://developer.android.com/reference/android/support/v4/view/LayoutInflaterCompat)
  - [MarginLayoutParamsCompat](https://developer.android.com/reference/android/support/v4/view/MarginLayoutParamsCompat)
  - [MenuCompat](https://developer.android.com/reference/android/support/v4/view/MenuCompat)
  - [MenuItemCompat](https://developer.android.com/reference/android/support/v4/view/MenuItemCompat)
  - [MotionEventCompat](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat)
  - [NestedScrollingChildHelper](https://developer.android.com/reference/android/support/v4/view/NestedScrollingChildHelper)
  - [NestedScrollingParentHelper](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParentHelper)
  - [PagerAdapter](https://developer.android.com/reference/android/support/v4/view/PagerAdapter)
  - [PagerTabStrip](https://developer.android.com/reference/android/support/v4/view/PagerTabStrip)
  - [PagerTitleStrip](https://developer.android.com/reference/android/support/v4/view/PagerTitleStrip)
  - [PointerIconCompat](https://developer.android.com/reference/android/support/v4/view/PointerIconCompat)
  - [ScaleGestureDetectorCompat](https://developer.android.com/reference/android/support/v4/view/ScaleGestureDetectorCompat)
  - [VelocityTrackerCompat](https://developer.android.com/reference/android/support/v4/view/VelocityTrackerCompat)
  - [ViewCompat](https://developer.android.com/reference/android/support/v4/view/ViewCompat)
  - [ViewConfigurationCompat](https://developer.android.com/reference/android/support/v4/view/ViewConfigurationCompat)
  - [ViewGroupCompat](https://developer.android.com/reference/android/support/v4/view/ViewGroupCompat)
  - [ViewPager](https://developer.android.com/reference/android/support/v4/view/ViewPager)
  - [ViewPager.LayoutParams](https://developer.android.com/reference/android/support/v4/view/ViewPager.LayoutParams)
  - [ViewPager.SavedState](https://developer.android.com/reference/android/support/v4/view/ViewPager.SavedState)
  - [ViewPager.SimpleOnPageChangeListener](https://developer.android.com/reference/android/support/v4/view/ViewPager.SimpleOnPageChangeListener)
  - [ViewParentCompat](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat)
  - [ViewPropertyAnimatorCompat](https://developer.android.com/reference/android/support/v4/view/ViewPropertyAnimatorCompat)
  - [ViewPropertyAnimatorListenerAdapter](https://developer.android.com/reference/android/support/v4/view/ViewPropertyAnimatorListenerAdapter)
  - [WindowCompat](https://developer.android.com/reference/android/support/v4/view/WindowCompat)
  - [WindowInsetsCompat](https://developer.android.com/reference/android/support/v4/view/WindowInsetsCompat)