MotionEvents


class MotionEvents


Facilitates sending of motion events to a UiController.

Summary

Nested types

Holds the result of a down motion.

Public functions

java-static MotionEvent!
obtainDownEvent(coordinates: FloatArray!, precision: FloatArray!)
java-static MotionEvent!
obtainDownEvent(
    coordinates: FloatArray!,
    precision: FloatArray!,
    inputDevice: Int,
    buttonState: Int
)

Obtains the MotionEvent of down.

java-static MotionEvent
obtainMovement(downEvent: MotionEvent, coordinates: FloatArray)

Create a new move motion event associated with the specified down motion event, at the current time.

java-static MotionEvent!
obtainMovement(downTime: Long, coordinates: FloatArray!)

This function is deprecated.

Use obtainMovement instead.

java-static MotionEvent
obtainMovement(
    downEvent: MotionEvent,
    eventTime: Long,
    coordinates: FloatArray
)

Create a new move motion event associated with the specified down motion event.

java-static MotionEvent!
obtainMovement(downTime: Long, eventTime: Long, coordinates: FloatArray!)

This function is deprecated.

Use obtainMovement instead.

java-static MotionEvent!
obtainUpEvent(downEvent: MotionEvent!, coordinates: FloatArray!)

Create a new finger up motion event associated with the specified down motion event, at the current time.

java-static MotionEvent!
obtainUpEvent(
    downEvent: MotionEvent!,
    eventTime: Long,
    coordinates: FloatArray!
)

Create a new finger up motion event associated with the specified down motion event.

java-static Unit
sendCancel(uiController: UiController!, downEvent: MotionEvent!)
java-static MotionEvents.DownResultHolder!
sendDown(
    uiController: UiController!,
    coordinates: FloatArray!,
    precision: FloatArray!
)
java-static MotionEvents.DownResultHolder!
sendDown(
    uiController: UiController!,
    coordinates: FloatArray!,
    precision: FloatArray!,
    inputDevice: Int,
    buttonState: Int
)
java-static Boolean
sendMovement(
    uiController: UiController!,
    downEvent: MotionEvent!,
    coordinates: FloatArray!
)
java-static Boolean
sendUp(uiController: UiController!, downEvent: MotionEvent!)
java-static Boolean
sendUp(
    uiController: UiController!,
    downEvent: MotionEvent!,
    coordinates: FloatArray!
)

Public functions

obtainDownEvent

java-static fun obtainDownEvent(coordinates: FloatArray!, precision: FloatArray!): MotionEvent!

obtainDownEvent

java-static fun obtainDownEvent(
    coordinates: FloatArray!,
    precision: FloatArray!,
    inputDevice: Int,
    buttonState: Int
): MotionEvent!

Obtains the MotionEvent of down.

obtainMovement

java-static fun obtainMovement(downEvent: MotionEvent, coordinates: FloatArray): MotionEvent

Create a new move motion event associated with the specified down motion event, at the current time.

Parameters
downEvent: MotionEvent

the finger down motion event assoicated with this event.

coordinates: FloatArray

The coordinates of the event

obtainMovement

java-static fun obtainMovement(downTime: Long, coordinates: FloatArray!): MotionEvent!

obtainMovement

java-static fun obtainMovement(
    downEvent: MotionEvent,
    eventTime: Long,
    coordinates: FloatArray
): MotionEvent

Create a new move motion event associated with the specified down motion event.

Parameters
downEvent: MotionEvent

the finger down motion event assoicated with this event.

eventTime: Long

The the time (in ms) when this specific event was generated.

coordinates: FloatArray

The coordinates of the event

obtainMovement

java-static fun obtainMovement(downTime: Long, eventTime: Long, coordinates: FloatArray!): MotionEvent!

obtainUpEvent

java-static fun obtainUpEvent(downEvent: MotionEvent!, coordinates: FloatArray!): MotionEvent!

Create a new finger up motion event associated with the specified down motion event, at the current time.

Parameters
downEvent: MotionEvent!

the finger down motion event assoicated with this event.

coordinates: FloatArray!

The coordinates of the event

obtainUpEvent

java-static fun obtainUpEvent(
    downEvent: MotionEvent!,
    eventTime: Long,
    coordinates: FloatArray!
): MotionEvent!

Create a new finger up motion event associated with the specified down motion event.

Parameters
downEvent: MotionEvent!

the finger down motion event assoicated with this event.

eventTime: Long

The the time (in ms) when this specific event was generated.

coordinates: FloatArray!

The coordinates of the event

sendCancel

java-static fun sendCancel(uiController: UiController!, downEvent: MotionEvent!): Unit

sendDown

java-static fun sendDown(
    uiController: UiController!,
    coordinates: FloatArray!,
    precision: FloatArray!
): MotionEvents.DownResultHolder!

sendDown

java-static fun sendDown(
    uiController: UiController!,
    coordinates: FloatArray!,
    precision: FloatArray!,
    inputDevice: Int,
    buttonState: Int
): MotionEvents.DownResultHolder!

sendMovement

java-static fun sendMovement(
    uiController: UiController!,
    downEvent: MotionEvent!,
    coordinates: FloatArray!
): Boolean

sendUp

java-static fun sendUp(uiController: UiController!, downEvent: MotionEvent!): Boolean

sendUp

java-static fun sendUp(
    uiController: UiController!,
    downEvent: MotionEvent!,
    coordinates: FloatArray!
): Boolean