{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

PointerEventType.Companion

public static class PointerEventType.Companion


Summary

Public methods

static final @NonNull PointerEventType

The cursor has entered the input region.

static final @NonNull PointerEventType

A cursor device or elevated stylus exited the input region.

static final @NonNull PointerEventType

The cursor or one or more touch pointers was moved.

static final @NonNull PointerEventType

A button on the device was pressed or a new pointer was detected.

static final @NonNull PointerEventType

A button on the device was released or a pointer was raised.

static final @NonNull PointerEventType

A scroll event was sent.

static final @NonNull PointerEventType

An unknown reason for the event.

Public methods

getEnter

public static final @NonNull PointerEventType getEnter()

The cursor has entered the input region. This will only be sent after the cursor is hovering when in the input region.

For example, the user's cursor is outside the input region and presses the button prior to entering the input region. The Enter event will be sent when the button is released inside the input region.

getExit

public static final @NonNull PointerEventType getExit()

A cursor device or elevated stylus exited the input region. This will only follow an Enter event, so if a cursor with the button pressed enters and exits region, neither Enter nor Exit will be sent for the input region. However, if a cursor enters the input region, then a button is pressed, then the cursor exits and reenters, Enter, Exit, and Enter will be received.

getMove

public static final @NonNull PointerEventType getMove()

The cursor or one or more touch pointers was moved.

getPress

public static final @NonNull PointerEventType getPress()

A button on the device was pressed or a new pointer was detected.

getRelease

public static final @NonNull PointerEventType getRelease()

A button on the device was released or a pointer was raised.

getScroll

public static final @NonNull PointerEventType getScroll()

A scroll event was sent. This can happen, for example, due to a mouse scroll wheel. This event indicates that the PointerInputChange.scrollDelta's Offset is non-zero.

getUnknown

public static final @NonNull PointerEventType getUnknown()

An unknown reason for the event.