{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
class MotionEvents
Facilitates sending of motion events to a UiController.
Nested types |
|
|---|---|
MotionEvents.DownResultHolder |
Holds the result of a down motion. |
Public constructors |
|
|---|---|
Public functions |
|
|---|---|
java-static MotionEvent! |
obtainDownEvent(Obtains the |
java-static MotionEvent! |
obtainDownEvent(coordinates: FloatArray!, precision: FloatArray!) |
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(Create a new move motion event associated with the specified down motion event. |
java-static MotionEvent! |
This function is deprecated. Use |
java-static MotionEvent! |
This function is deprecated. Use |
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(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( |
java-static MotionEvents.DownResultHolder! |
sendDown( |
java-static Boolean |
sendMovement( |
java-static Boolean |
sendUp(uiController: UiController!, downEvent: MotionEvent!) |
java-static Boolean |
sendUp( |
java-static fun obtainDownEvent(
coordinates: FloatArray!,
precision: FloatArray!,
inputDevice: Int,
buttonState: Int
): MotionEvent!
Obtains the MotionEvent of down.
java-static fun obtainDownEvent(coordinates: FloatArray!, precision: FloatArray!): MotionEvent!
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 |
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 |
java-static funobtainMovement(downTime: Long, coordinates: FloatArray!): MotionEvent!
java-static funobtainMovement(downTime: Long, eventTime: Long, coordinates: FloatArray!): MotionEvent!
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 |
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 |
java-static fun sendDown(
uiController: UiController!,
coordinates: FloatArray!,
precision: FloatArray!
): MotionEvents.DownResultHolder!
java-static fun sendDown(
uiController: UiController!,
coordinates: FloatArray!,
precision: FloatArray!,
inputDevice: Int,
buttonState: Int
): MotionEvents.DownResultHolder!
java-static fun sendMovement(
uiController: UiController!,
downEvent: MotionEvent!,
coordinates: FloatArray!
): Boolean
java-static fun sendUp(
uiController: UiController!,
downEvent: MotionEvent!,
coordinates: FloatArray!
): Boolean