public class TouchEvent extends Event<TouchEvent>
MotionEvent.
TouchEvent coalescing can happen for move events if two move events have the same target view
and coalescing key. See TouchEventCoalescingKeyHelper for more information about how
these coalescing keys are determined.
| Modifier and Type | Field and Description |
|---|---|
static long |
UNSET |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCoalesce() |
void |
dispatch(RCTEventEmitter rctEventEmitter)
Dispatch this event to JS using the given event emitter.
|
short |
getCoalescingKey() |
java.lang.String |
getEventName() |
android.view.MotionEvent |
getMotionEvent() |
float |
getViewX() |
float |
getViewY() |
static TouchEvent |
obtain(int viewTag,
TouchEventType touchEventType,
android.view.MotionEvent motionEventToCopy,
long gestureStartTime,
float viewX,
float viewY,
TouchEventCoalescingKeyHelper touchEventCoalescingKeyHelper) |
void |
onDispose()
Called when the EventDispatcher is done with an event, either because it was dispatched or
because it was coalesced with another Event.
|
coalesce, getTimestampMs, getUniqueID, getViewTag, initpublic static final long UNSET
public static TouchEvent obtain(int viewTag, TouchEventType touchEventType, android.view.MotionEvent motionEventToCopy, long gestureStartTime, float viewX, float viewY, TouchEventCoalescingKeyHelper touchEventCoalescingKeyHelper)
public void onDispose()
EventonDispose in class Event<TouchEvent>public java.lang.String getEventName()
getEventName in class Event<TouchEvent>public boolean canCoalesce()
canCoalesce in class Event<TouchEvent>public short getCoalescingKey()
getCoalescingKey in class Event<TouchEvent>public void dispatch(RCTEventEmitter rctEventEmitter)
Eventdispatch in class Event<TouchEvent>public android.view.MotionEvent getMotionEvent()
public float getViewX()
public float getViewY()