# MotionEvent.PointerProperties

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

# PointerProperties

*** ** * ** ***

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

```
class PointerProperties
```

|---|------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                           ||
| ↳ | [android.view.MotionEvent.PointerProperties](https://developer.android.com/reference/kotlin/android/view/MotionEvent.PointerProperties#) |

Transfer object for pointer properties. Objects of this type can be used to specify the pointer id and tool type when creating new[MotionEvent](https://developer.android.com/reference/kotlin/android/view/MotionEvent)objects and to query pointer properties in bulk.

## Summary

|                                                                                                                                                                                                      Public constructors                                                                                                                                                                                                       ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [PointerProperties](https://developer.android.com/reference/kotlin/android/view/MotionEvent.PointerProperties#PointerProperties())`()` Creates a pointer properties object with an invalid pointer id.                                                                                                                                                                                                                      |
| [PointerProperties](https://developer.android.com/reference/kotlin/android/view/MotionEvent.PointerProperties#PointerProperties(android.view.MotionEvent.PointerProperties))`(`other:` `[MotionEvent.PointerProperties](https://developer.android.com/reference/kotlin/android/view/MotionEvent.PointerProperties#)!`)` Creates a pointer properties object as a copy of the contents of another pointer properties object. |

|                                                                                                                                                                                                                   Public methods                                                                                                                                                                                                                    ||
|------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)       | [clear](https://developer.android.com/reference/kotlin/android/view/MotionEvent.PointerProperties#clear())`()` Resets the pointer properties to their initial values.                                                                                                                                                                                           |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)       | [copyFrom](https://developer.android.com/reference/kotlin/android/view/MotionEvent.PointerProperties#copyFrom(android.view.MotionEvent.PointerProperties))`(`other:` `[MotionEvent.PointerProperties](https://developer.android.com/reference/kotlin/android/view/MotionEvent.PointerProperties#)!`)` Copies the contents of another pointer properties object. |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [equals](https://developer.android.com/reference/kotlin/android/view/MotionEvent.PointerProperties#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` Indicates whether some other object is "equal to" this one.                                                                                    |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [hashCode](https://developer.android.com/reference/kotlin/android/view/MotionEvent.PointerProperties#hashCode())`()` <br />                                                                                                                                                                                                                                     |

|                                                                                                          Properties                                                                                                          ||
|----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [id](https://developer.android.com/reference/kotlin/android/view/MotionEvent.PointerProperties#id:kotlin.Int) The pointer id.                    |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [toolType](https://developer.android.com/reference/kotlin/android/view/MotionEvent.PointerProperties#toolType:kotlin.Int) The pointer tool type. |

## Public constructors

### PointerProperties

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

```
PointerProperties()
```

Creates a pointer properties object with an invalid pointer id.  

### PointerProperties

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

```
PointerProperties(other: MotionEvent.PointerProperties!)
```

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

|                                                               Parameters                                                               ||
|---------|-------------------------------------------------------------------------------------------------------------------------------|
| `other` | [MotionEvent.PointerProperties](https://developer.android.com/reference/kotlin/android/view/MotionEvent.PointerProperties#)!: |

## Public methods

### clear

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

```
fun clear(): Unit
```

Resets the pointer properties to their initial values.  

### copyFrom

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

```
fun copyFrom(other: MotionEvent.PointerProperties!): Unit
```

Copies the contents of another pointer properties object.

|                                                                                  Parameters                                                                                  ||
|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `other` | [MotionEvent.PointerProperties](https://developer.android.com/reference/kotlin/android/view/MotionEvent.PointerProperties#)!:The pointer properties object to copy. |

### equals

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

```
fun equals(other: Any?): Boolean
```

Indicates whether some other object is "equal to" this one.

The`equals`method implements an equivalence relation on non-null object references:

- It is*reflexive* : for any non-null reference value`x`,`x.equals(x)`should return`true`.
- It is*symmetric* : for any non-null reference values`x`and`y`,`x.equals(y)`should return`true`if and only if`y.equals(x)`returns`true`.
- It is*transitive* : for any non-null reference values`x`,`y`, and`z`, if`x.equals(y)`returns`true`and`y.equals(z)`returns`true`, then`x.equals(z)`should return`true`.
- It is*consistent* : for any non-null reference values`x`and`y`, multiple invocations of`x.equals(y)`consistently return`true`or consistently return`false`, provided no information used in`equals`comparisons on the objects is modified.
- For any non-null reference value`x`,`x.equals(null)`should return`false`.

An equivalence relation partitions the elements it operates on into*equivalence classes*; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

|                                                  Parameters                                                   ||
|---------|------------------------------------------------------------------------------------------------------|
| `obj`   | the reference object with which to compare.                                                          |
| `other` | [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?:This value may be`null`. |

|                                                                           Return                                                                           ||
|------------------------------------------------------------------------------------|------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `true`if this object is the same as the obj argument;`false`otherwise. |

### hashCode

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

```
fun hashCode(): Int
```

|                                                     Return                                                     ||
|----------------------------------------------------------------------------|------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | a hash code value for this object. |

## Properties

### id

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

```
var id: Int
```

The pointer id. Initially set to[INVALID_POINTER_ID](https://developer.android.com/reference/kotlin/android/view/MotionEvent#INVALID_POINTER_ID:kotlin.Int)(-1).  
**See Also**

- [android.view.MotionEvent#getPointerId(int)](https://developer.android.com/reference/kotlin/android/view/MotionEvent#getPointerId(kotlin.Int))  

### toolType

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

```
var toolType: Int
```

The pointer tool type. Initially set to 0.  
Value is[android.view.MotionEvent#TOOL_TYPE_UNKNOWN](https://developer.android.com/reference/kotlin/android/view/MotionEvent#TOOL_TYPE_UNKNOWN:kotlin.Int),[android.view.MotionEvent#TOOL_TYPE_FINGER](https://developer.android.com/reference/kotlin/android/view/MotionEvent#TOOL_TYPE_FINGER:kotlin.Int),[android.view.MotionEvent#TOOL_TYPE_STYLUS](https://developer.android.com/reference/kotlin/android/view/MotionEvent#TOOL_TYPE_STYLUS:kotlin.Int),[android.view.MotionEvent#TOOL_TYPE_MOUSE](https://developer.android.com/reference/kotlin/android/view/MotionEvent#TOOL_TYPE_MOUSE:kotlin.Int),[android.view.MotionEvent#TOOL_TYPE_ERASER](https://developer.android.com/reference/kotlin/android/view/MotionEvent#TOOL_TYPE_ERASER:kotlin.Int), or android.view.MotionEvent.TOOL_TYPE_PALM  
**See Also**

- [android.view.MotionEvent#getToolType(int)](https://developer.android.com/reference/kotlin/android/view/MotionEvent#getToolType(kotlin.Int))