# MotionEvent.PointerCoords

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Fields](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#lfields)\|[Ctors](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#pubctors)\|[Methods](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#inhmethods)  

# MotionEvent.PointerCoords

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/view/MotionEvent.PointerCoords "View this page in Kotlin")\|Java

`
public
static
final

class
MotionEvent.PointerCoords
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|----------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.view.MotionEvent.PointerCoords |

<br />

*** ** * ** ***

Transfer object for pointer coordinates. Objects of this type can be used to specify the pointer coordinates when creating new[MotionEvent](https://developer.android.com/reference/android/view/MotionEvent)objects and to query pointer coordinates in bulk. Refer to[InputDevice](https://developer.android.com/reference/android/view/InputDevice)for information about how different kinds of input devices and sources represent pointer coordinates.

## Summary

|                                                                                                                       ### Fields                                                                                                                        ||
|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` public float` | [orientation](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#orientation) The orientation of the touch area and tool area in radians clockwise from vertical.                                          |
| ` public float` | [pressure](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#pressure) A normalized value that describes the pressure applied to the device by a finger or other tool.                                    |
| ` public float` | [size](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#size) A normalized value that describes the approximate size of the pointer touch area in relation to the maximum detectable size of the device. |
| ` public float` | [toolMajor](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#toolMajor) The length of the major axis of an ellipse that describes the size of the approaching tool.                                      |
| ` public float` | [toolMinor](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#toolMinor) The length of the minor axis of an ellipse that describes the size of the approaching tool.                                      |
| ` public float` | [touchMajor](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#touchMajor) The length of the major axis of an ellipse that describes the touch area at the point of contact.                              |
| ` public float` | [touchMinor](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#touchMinor) The length of the minor axis of an ellipse that describes the touch area at the point of contact.                              |
| ` public float` | [x](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#x) The X component of the pointer movement.                                                                                                         |
| ` public float` | [y](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#y) The Y component of the pointer movement.                                                                                                         |

|                                                                                                                                                                             ### Public constructors                                                                                                                                                                             ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[PointerCoords](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#PointerCoords())`() ` Creates a pointer coords object with all axes initialized to zero.                                                                                                                                                                                   |
| ` `[PointerCoords](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#PointerCoords(android.view.MotionEvent.PointerCoords))`(`[MotionEvent.PointerCoords](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords)` other) ` Creates a pointer coords object as a copy of the contents of another pointer coords object. |

|                                                                                                                                                            ### Public methods                                                                                                                                                            ||
|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void`    | ` `[clear](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#clear())`() ` Clears the contents of this object.                                                                                                                                                                                  |
| ` void`    | ` `[copyFrom](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#copyFrom(android.view.MotionEvent.PointerCoords))`(`[MotionEvent.PointerCoords](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords)` other) ` Copies the contents of another pointer coords object. |
| ` float`   | ` `[getAxisValue](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#getAxisValue(int))`(int axis) ` Gets the value associated with the specified axis.                                                                                                                                          |
| ` boolean` | ` `[isResampled](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#isResampled())`() ` Returns true if these pointer coordinates were generated by resampling, rather than from an actual input event from the device at this time.                                                             |
| ` void`    | ` `[setAxisValue](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#setAxisValue(int,%20float))`(int axis, float value) ` Sets the value associated with the specified axis.                                                                                                                    |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Fields

### orientation

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public float orientation
```

The orientation of the touch area and tool area in radians clockwise from vertical. An angle of 0 radians indicates that the major axis of contact is oriented upwards, is perfectly circular or is of unknown orientation. A positive angle indicates that the major axis of contact is oriented to the right. A negative angle indicates that the major axis of contact is oriented to the left. The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians (finger pointing fully right).

<br />

**See also:**

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

### pressure

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public float pressure
```

A normalized value that describes the pressure applied to the device by a finger or other tool. The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure), although values higher than 1 may be generated depending on the calibration of the input device.

<br />

**See also:**

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

### size

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public float size
```

A normalized value that describes the approximate size of the pointer touch area in relation to the maximum detectable size of the device. It represents some approximation of the area of the screen being pressed; the actual value in pixels corresponding to the touch is normalized with the device specific range of values and scaled to a value between 0 and 1. The value of size can be used to determine fat touch events.

<br />

**See also:**

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

### toolMajor

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public float toolMajor
```

The length of the major axis of an ellipse that describes the size of the approaching tool. The tool area represents the estimated size of the finger or pen that is touching the device independent of its actual touch area at the point of contact. If the device is a touch screen, the length is reported in pixels, otherwise it is reported in device-specific units.

<br />

**See also:**

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

### toolMinor

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public float toolMinor
```

The length of the minor axis of an ellipse that describes the size of the approaching tool. The tool area represents the estimated size of the finger or pen that is touching the device independent of its actual touch area at the point of contact. If the device is a touch screen, the length is reported in pixels, otherwise it is reported in device-specific units.

<br />

**See also:**

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

### touchMajor

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public float touchMajor
```

The length of the major axis of an ellipse that describes the touch area at the point of contact. If the device is a touch screen, the length is reported in pixels, otherwise it is reported in device-specific units.

<br />

**See also:**

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

### touchMinor

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public float touchMinor
```

The length of the minor axis of an ellipse that describes the touch area at the point of contact. If the device is a touch screen, the length is reported in pixels, otherwise it is reported in device-specific units.

<br />

**See also:**

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

### x

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public float x
```

The X component of the pointer movement.

<br />

**See also:**

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

### y

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public float y
```

The Y component of the pointer movement.

<br />

**See also:**

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

## Public constructors

### PointerCoords

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public PointerCoords ()
```

Creates a pointer coords object with all axes initialized to zero.

<br />

### PointerCoords

Added in[API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public PointerCoords (MotionEvent.PointerCoords other)
```

Creates a pointer coords object as a copy of the contents of another pointer coords object.

<br />

|                                   Parameters                                    ||
|---------|------------------------------------------------------------------------|
| `other` | `MotionEvent.PointerCoords`: The pointer coords object to copy. <br /> |

## Public methods

### clear

Added in[API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void clear ()
```

Clears the contents of this object. Resets all axes to zero.

<br />

### copyFrom

Added in[API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void copyFrom (MotionEvent.PointerCoords other)
```

Copies the contents of another pointer coords object.

<br />

|                                   Parameters                                    ||
|---------|------------------------------------------------------------------------|
| `other` | `MotionEvent.PointerCoords`: The pointer coords object to copy. <br /> |

### getAxisValue

Added in[API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public float getAxisValue (int axis)
```

Gets the value associated with the specified axis.

<br />

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

|                              Returns                              ||
|---------|----------------------------------------------------------|
| `float` | The value associated with the axis, or 0 if none. <br /> |

**See also:**

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

### isResampled

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public boolean isResampled ()
```

Returns true if these pointer coordinates were generated by resampling, rather than from an actual input event from the device at this time.

Resampling extrapolates or interpolates touch coordinates reported by the input device to better align them with the refresh rate of the display, resulting in smoother movements, in particular for scrolling. Resampled coordinates are always added to batches, so a motion event will always contain at least one sample that is an original event from the input device (i.e. for which this method will return`false`).

Resampling does not occur if unbuffered dispatch has been requested, or if it has been disabled by the manufacturer (for example, on hardware that already synchronizes its touch events and display frames).

<br />

<br />

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

**See also:**

- [View.requestUnbufferedDispatch(int)](https://developer.android.com/reference/android/view/View#requestUnbufferedDispatch(int))
- [View.requestUnbufferedDispatch(MotionEvent)](https://developer.android.com/reference/android/view/View#requestUnbufferedDispatch(android.view.MotionEvent))  

### setAxisValue

Added in[API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setAxisValue (int axis, 
                float value)
```

Sets the value associated with the specified axis.

<br />

|                                Parameters                                ||
|---------|-----------------------------------------------------------------|
| `axis`  | `int`: The axis identifier for the axis value to assign. <br /> |
| `value` | `float`: The value to set. <br />                               |

**See also:**

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