# PointerIcon

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Constants](https://developer.android.com/reference/android/view/PointerIcon#constants)\|[Inherited Constants](https://developer.android.com/reference/android/view/PointerIcon#inhconstants)\|[Fields](https://developer.android.com/reference/android/view/PointerIcon#lfields)\|[Methods](https://developer.android.com/reference/android/view/PointerIcon#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/view/PointerIcon#inhmethods)  

# PointerIcon

*** ** * ** ***

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

`
public

final

class
PointerIcon
`  
`

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


``


implements

`[Parcelable](https://developer.android.com/reference/android/os/Parcelable)`


`

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

<br />

*** ** * ** ***

Represents an icon that can be used as a mouse pointer.

Pointer icons can be provided either by the system using system types, or by applications using bitmaps or application resources.

<br />

## Summary

|                                                                                                                                                                                                                                                                                                                                                                                                                   ### Constants                                                                                                                                                                                                                                                                                                                                                                                                                    ||
|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [TYPE_ALIAS](https://developer.android.com/reference/android/view/PointerIcon#TYPE_ALIAS) Type constant: alias (indicating an alias of/shortcut to something is to be created.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `int` | [TYPE_ALL_SCROLL](https://developer.android.com/reference/android/view/PointerIcon#TYPE_ALL_SCROLL) Type constant: all-scroll.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `int` | [TYPE_ARROW](https://developer.android.com/reference/android/view/PointerIcon#TYPE_ARROW) Type constant: Arrow icon.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `int` | [TYPE_CELL](https://developer.android.com/reference/android/view/PointerIcon#TYPE_CELL) Type constant: cell.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `int` | [TYPE_CONTEXT_MENU](https://developer.android.com/reference/android/view/PointerIcon#TYPE_CONTEXT_MENU) Type constant: context-menu.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `int` | [TYPE_COPY](https://developer.android.com/reference/android/view/PointerIcon#TYPE_COPY) Type constant: copy.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `int` | [TYPE_CROSSHAIR](https://developer.android.com/reference/android/view/PointerIcon#TYPE_CROSSHAIR) Type constant: crosshair.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `int` | [TYPE_DEFAULT](https://developer.android.com/reference/android/view/PointerIcon#TYPE_DEFAULT) *This constant was deprecated in API level 35. This is the same as using[TYPE_ARROW](https://developer.android.com/reference/android/view/PointerIcon#TYPE_ARROW). Use[TYPE_ARROW](https://developer.android.com/reference/android/view/PointerIcon#TYPE_ARROW)to explicitly show an arrow, or use a`null`[PointerIcon](https://developer.android.com/reference/android/view/PointerIcon)with[View.setPointerIcon(PointerIcon)](https://developer.android.com/reference/android/view/View#setPointerIcon(android.view.PointerIcon))or[View.onResolvePointerIcon(MotionEvent, int)](https://developer.android.com/reference/android/view/View#onResolvePointerIcon(android.view.MotionEvent,%20int))instead to show the default pointer icon.* |
| `int` | [TYPE_GRAB](https://developer.android.com/reference/android/view/PointerIcon#TYPE_GRAB) Type constant: grab.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `int` | [TYPE_GRABBING](https://developer.android.com/reference/android/view/PointerIcon#TYPE_GRABBING) Type constant: grabbing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `int` | [TYPE_HAND](https://developer.android.com/reference/android/view/PointerIcon#TYPE_HAND) Type constant: hand.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `int` | [TYPE_HANDWRITING](https://developer.android.com/reference/android/view/PointerIcon#TYPE_HANDWRITING) Type constant: handwriting.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `int` | [TYPE_HELP](https://developer.android.com/reference/android/view/PointerIcon#TYPE_HELP) Type constant: help.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `int` | [TYPE_HORIZONTAL_DOUBLE_ARROW](https://developer.android.com/reference/android/view/PointerIcon#TYPE_HORIZONTAL_DOUBLE_ARROW) Type constant: horizontal double arrow mainly for resizing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `int` | [TYPE_NO_DROP](https://developer.android.com/reference/android/view/PointerIcon#TYPE_NO_DROP) Type constant: no-drop.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `int` | [TYPE_NULL](https://developer.android.com/reference/android/view/PointerIcon#TYPE_NULL) Type constant: Null icon.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `int` | [TYPE_TEXT](https://developer.android.com/reference/android/view/PointerIcon#TYPE_TEXT) Type constant: text.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `int` | [TYPE_TOP_LEFT_DIAGONAL_DOUBLE_ARROW](https://developer.android.com/reference/android/view/PointerIcon#TYPE_TOP_LEFT_DIAGONAL_DOUBLE_ARROW) Type constant: diagonal double arrow -- top-left to bottom-right.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `int` | [TYPE_TOP_RIGHT_DIAGONAL_DOUBLE_ARROW](https://developer.android.com/reference/android/view/PointerIcon#TYPE_TOP_RIGHT_DIAGONAL_DOUBLE_ARROW) Type constant: diagonal double arrow -- top-right to bottom-left.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `int` | [TYPE_VERTICAL_DOUBLE_ARROW](https://developer.android.com/reference/android/view/PointerIcon#TYPE_VERTICAL_DOUBLE_ARROW) Type constant: vertical double arrow mainly for resizing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `int` | [TYPE_VERTICAL_TEXT](https://developer.android.com/reference/android/view/PointerIcon#TYPE_VERTICAL_TEXT) Type constant: vertical-text.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `int` | [TYPE_WAIT](https://developer.android.com/reference/android/view/PointerIcon#TYPE_WAIT) Type constant: wait.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `int` | [TYPE_ZOOM_IN](https://developer.android.com/reference/android/view/PointerIcon#TYPE_ZOOM_IN) Type constant: zoom-in.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `int` | [TYPE_ZOOM_OUT](https://developer.android.com/reference/android/view/PointerIcon#TYPE_ZOOM_OUT) Type constant: zoom-out.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ### Inherited constants                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From interface[android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable) |-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `int` | [CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR) Descriptor bit used with[describeContents()](https://developer.android.com/reference/android/os/Parcelable#describeContents()): indicates that the Parcelable object's flattened representation includes a file descriptor.                                                                                                                                            | | `int` | [PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE) Flag for use with[writeToParcel(Parcel, int)](https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)): the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`". | |

|                                                                                                                                        ### Fields                                                                                                                                        ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------|
| ` public static final `[Creator](https://developer.android.com/reference/android/os/Parcelable.Creator)`<`[PointerIcon](https://developer.android.com/reference/android/view/PointerIcon)`>` | [CREATOR](https://developer.android.com/reference/android/view/PointerIcon#CREATOR) <br /> |

|                                                                                                                                                                                                       ### Public methods                                                                                                                                                                                                       ||
|-------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static `[PointerIcon](https://developer.android.com/reference/android/view/PointerIcon) | ` `[create](https://developer.android.com/reference/android/view/PointerIcon#create(android.graphics.Bitmap,%20float,%20float))`(`[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)` bitmap, float hotSpotX, float hotSpotY) ` Creates a custom pointer icon from the given bitmap and hotspot information. |
| ` int`                                                                                    | ` `[describeContents](https://developer.android.com/reference/android/view/PointerIcon#describeContents())`() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.                                                                                                             |
| ` boolean`                                                                                | ` `[equals](https://developer.android.com/reference/android/view/PointerIcon#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` other) ` Indicates whether some other object is "equal to" this one.                                                                                   |
| ` static `[PointerIcon](https://developer.android.com/reference/android/view/PointerIcon) | ` `[getSystemIcon](https://developer.android.com/reference/android/view/PointerIcon#getSystemIcon(android.content.Context,%20int))`(`[Context](https://developer.android.com/reference/android/content/Context)` context, int type) ` Gets a system pointer icon for the given type.                                                |
| ` static `[PointerIcon](https://developer.android.com/reference/android/view/PointerIcon) | ` `[load](https://developer.android.com/reference/android/view/PointerIcon#load(android.content.res.Resources,%20int))`(`[Resources](https://developer.android.com/reference/android/content/res/Resources)` resources, int resourceId) ` Loads a custom pointer icon from an XML resource.                                         |
| ` `[String](https://developer.android.com/reference/java/lang/String)                     | ` `[toString](https://developer.android.com/reference/android/view/PointerIcon#toString())`() ` Returns a string representation of the object.                                                                                                                                                                                      |
| ` void`                                                                                   | ` `[writeToParcel](https://developer.android.com/reference/android/view/PointerIcon#writeToParcel(android.os.Parcel,%20int))`(`[Parcel](https://developer.android.com/reference/android/os/Parcel)` out, int flags) ` Flatten this object in to a Parcel.                                                                           |

| ### 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*.                                                                                             | ||
| From interface` `[android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable)` ` |------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract int`  | ` `[describeContents](https://developer.android.com/reference/android/os/Parcelable#describeContents())`() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.                                    | | ` abstract void` | ` `[writeToParcel](https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int))`(`[Parcel](https://developer.android.com/reference/android/os/Parcel)` dest, int flags) ` Flatten this object in to a Parcel. | ||

## Constants

### TYPE_ALIAS

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

```
public static final int TYPE_ALIAS
```

Type constant: alias (indicating an alias of/shortcut to something is to be created.

<br />

Constant Value: 1010 (0x000003f2)  

### TYPE_ALL_SCROLL

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

```
public static final int TYPE_ALL_SCROLL
```

Type constant: all-scroll.

<br />

Constant Value: 1013 (0x000003f5)  

### TYPE_ARROW

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

```
public static final int TYPE_ARROW
```

Type constant: Arrow icon. (Default mouse pointer)

<br />

Constant Value: 1000 (0x000003e8)  

### TYPE_CELL

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

```
public static final int TYPE_CELL
```

Type constant: cell.

<br />

Constant Value: 1006 (0x000003ee)  

### TYPE_CONTEXT_MENU

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

```
public static final int TYPE_CONTEXT_MENU
```

Type constant: context-menu.

<br />

Constant Value: 1001 (0x000003e9)  

### TYPE_COPY

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

```
public static final int TYPE_COPY
```

Type constant: copy.

<br />

Constant Value: 1011 (0x000003f3)  

### TYPE_CROSSHAIR

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

```
public static final int TYPE_CROSSHAIR
```

Type constant: crosshair.

<br />

Constant Value: 1007 (0x000003ef)  

### TYPE_DEFAULT

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

```
public static final int TYPE_DEFAULT
```

<br />

**This constant was deprecated in API level 35.**   
This is the same as using[TYPE_ARROW](https://developer.android.com/reference/android/view/PointerIcon#TYPE_ARROW). Use[TYPE_ARROW](https://developer.android.com/reference/android/view/PointerIcon#TYPE_ARROW)to explicitly show an arrow, or use a`null`[PointerIcon](https://developer.android.com/reference/android/view/PointerIcon)with[View.setPointerIcon(PointerIcon)](https://developer.android.com/reference/android/view/View#setPointerIcon(android.view.PointerIcon))or[View.onResolvePointerIcon(MotionEvent, int)](https://developer.android.com/reference/android/view/View#onResolvePointerIcon(android.view.MotionEvent,%20int))instead to show the default pointer icon.

The default pointer icon.

<br />

Constant Value: 1000 (0x000003e8)  

### TYPE_GRAB

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

```
public static final int TYPE_GRAB
```

Type constant: grab.

<br />

Constant Value: 1020 (0x000003fc)  

### TYPE_GRABBING

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

```
public static final int TYPE_GRABBING
```

Type constant: grabbing.

<br />

Constant Value: 1021 (0x000003fd)  

### TYPE_HAND

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

```
public static final int TYPE_HAND
```

Type constant: hand.

<br />

Constant Value: 1002 (0x000003ea)  

### TYPE_HANDWRITING

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

```
public static final int TYPE_HANDWRITING
```

Type constant: handwriting.

<br />

Constant Value: 1022 (0x000003fe)  

### TYPE_HELP

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

```
public static final int TYPE_HELP
```

Type constant: help.

<br />

Constant Value: 1003 (0x000003eb)  

### TYPE_HORIZONTAL_DOUBLE_ARROW

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

```
public static final int TYPE_HORIZONTAL_DOUBLE_ARROW
```

Type constant: horizontal double arrow mainly for resizing.

<br />

Constant Value: 1014 (0x000003f6)  

### TYPE_NO_DROP

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

```
public static final int TYPE_NO_DROP
```

Type constant: no-drop.

<br />

Constant Value: 1012 (0x000003f4)  

### TYPE_NULL

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

```
public static final int TYPE_NULL
```

Type constant: Null icon. It has no bitmap.

<br />

Constant Value: 0 (0x00000000)  

### TYPE_TEXT

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

```
public static final int TYPE_TEXT
```

Type constant: text.

<br />

Constant Value: 1008 (0x000003f0)  

### TYPE_TOP_LEFT_DIAGONAL_DOUBLE_ARROW

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

```
public static final int TYPE_TOP_LEFT_DIAGONAL_DOUBLE_ARROW
```

Type constant: diagonal double arrow -- top-left to bottom-right.

<br />

Constant Value: 1017 (0x000003f9)  

### TYPE_TOP_RIGHT_DIAGONAL_DOUBLE_ARROW

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

```
public static final int TYPE_TOP_RIGHT_DIAGONAL_DOUBLE_ARROW
```

Type constant: diagonal double arrow -- top-right to bottom-left.

<br />

Constant Value: 1016 (0x000003f8)  

### TYPE_VERTICAL_DOUBLE_ARROW

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

```
public static final int TYPE_VERTICAL_DOUBLE_ARROW
```

Type constant: vertical double arrow mainly for resizing.

<br />

Constant Value: 1015 (0x000003f7)  

### TYPE_VERTICAL_TEXT

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

```
public static final int TYPE_VERTICAL_TEXT
```

Type constant: vertical-text.

<br />

Constant Value: 1009 (0x000003f1)  

### TYPE_WAIT

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

```
public static final int TYPE_WAIT
```

Type constant: wait.

<br />

Constant Value: 1004 (0x000003ec)  

### TYPE_ZOOM_IN

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

```
public static final int TYPE_ZOOM_IN
```

Type constant: zoom-in.

<br />

Constant Value: 1018 (0x000003fa)  

### TYPE_ZOOM_OUT

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

```
public static final int TYPE_ZOOM_OUT
```

Type constant: zoom-out.

<br />

Constant Value: 1019 (0x000003fb)

## Fields

### CREATOR

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

```
public static final Creator<PointerIcon> CREATOR
```

<br />

<br />

## Public methods

### create

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

```
public static PointerIcon create (Bitmap bitmap, 
                float hotSpotX, 
                float hotSpotY)
```

Creates a custom pointer icon from the given bitmap and hotspot information.

<br />

|                                                               Parameters                                                               ||
|------------|----------------------------------------------------------------------------------------------------------------------------|
| `bitmap`   | `Bitmap`: The bitmap for the icon. This value cannot be`null`. <br />                                                      |
| `hotSpotX` | `float`: The X offset of the pointer icon hotspot in the bitmap. Must be within the \[0, bitmap.getWidth()) range. <br />  |
| `hotSpotY` | `float`: The Y offset of the pointer icon hotspot in the bitmap. Must be within the \[0, bitmap.getHeight()) range. <br /> |

|                                                                       Returns                                                                       ||
|---------------------------------------------------------------------------------|--------------------------------------------------------------------|
| [PointerIcon](https://developer.android.com/reference/android/view/PointerIcon) | A pointer icon for this bitmap. This value cannot be`null`. <br /> |

|                                                                                  Throws                                                                                  ||
|--------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) | if bitmap is null, or if the x/y hotspot parameters are invalid. |

### describeContents

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

```
public int describeContents ()
```

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of[writeToParcel(android.os.Parcel, int)](https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)), the return value of this method must include the[CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR)bit.

<br />

|                                                                                                                         Returns                                                                                                                         ||
|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either`0`or[CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR) <br /> |

### equals

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

```
public boolean equals (Object other)
```

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.

<br />

|                     Parameters                     ||
|---------|-------------------------------------------|
| `other` | `Object`: This value may be`null`. <br /> |

|                                         Returns                                          ||
|-----------|-------------------------------------------------------------------------------|
| `boolean` | `true`if this object is the same as the obj argument;`false`otherwise. <br /> |

### getSystemIcon

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

```
public static PointerIcon getSystemIcon (Context context, 
                int type)
```

Gets a system pointer icon for the given type.

<br />

|                              Parameters                               ||
|-----------|------------------------------------------------------------|
| `context` | `Context`: The context. This value cannot be`null`. <br /> |
| `type`    | `int`: The pointer icon type. <br />                       |

|                                                                Returns                                                                ||
|---------------------------------------------------------------------------------|------------------------------------------------------|
| [PointerIcon](https://developer.android.com/reference/android/view/PointerIcon) | The pointer icon. This value cannot be`null`. <br /> |

|                                                           Throws                                                            ||
|--------------------------------------------------------------------------------------------------------|---------------------|
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) | if context is null. |

### load

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

```
public static PointerIcon load (Resources resources, 
                int resourceId)
```

Loads a custom pointer icon from an XML resource.

The XML resource should have the following form:`
<?xml version="1.0" encoding="utf-8"?>
<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
android:bitmap="@drawable/my_pointer_bitmap"
android:hotSpotX="24"
android:hotSpotY="24" />
`

<br />

<br />

|                                     Parameters                                      ||
|--------------|-----------------------------------------------------------------------|
| `resources`  | `Resources`: The resources object. This value cannot be`null`. <br /> |
| `resourceId` | `int`: The resource id. <br />                                        |

|                                                                Returns                                                                ||
|---------------------------------------------------------------------------------|------------------------------------------------------|
| [PointerIcon](https://developer.android.com/reference/android/view/PointerIcon) | The pointer icon. This value cannot be`null`. <br /> |

|                                                                                                   Throws                                                                                                    ||
|------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException)                 | if resources is null.                                                               |
| [Resources.NotFoundException](https://developer.android.com/reference/android/content/res/Resources.NotFoundException) | if the resource was not found or the drawable linked in the resource was not found. |

### toString

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

```
public String toString ()
```

Returns a string representation of the object.

<br />

|                                                      Returns                                                      ||
|--------------------------------------------------------------------|-----------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | a string representation of the object. <br /> |

### writeToParcel

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

```
public void writeToParcel (Parcel out, 
                int flags)
```

Flatten this object in to a Parcel.

<br />

|                                                                                                                                                                                                                               Parameters                                                                                                                                                                                                                                ||
|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `out`   | `Parcel`: The Parcel in which the object should be written. This value cannot be`null`. <br />                                                                                                                                                                                                                                                                                                                                                                 |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or[Parcelable.PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE). Value is either`0`or a combination of[Parcelable.PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE), and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES <br /> |