-
public final class MotionEventCompatHelper for accessing features in MotionEvent.
-
-
Field Summary
Fields Modifier and Type Field Description public final static intACTION_MASKpublic final static intACTION_POINTER_DOWNpublic final static intACTION_POINTER_UPpublic final static intACTION_HOVER_MOVEpublic final static intACTION_SCROLLpublic final static intACTION_POINTER_INDEX_MASKpublic final static intACTION_POINTER_INDEX_SHIFTpublic final static intACTION_HOVER_ENTERpublic final static intACTION_HOVER_EXITpublic final static intAXIS_Xpublic final static intAXIS_Ypublic final static intAXIS_PRESSUREpublic final static intAXIS_SIZEpublic final static intAXIS_TOUCH_MAJORpublic final static intAXIS_TOUCH_MINORpublic final static intAXIS_TOOL_MAJORpublic final static intAXIS_TOOL_MINORpublic final static intAXIS_ORIENTATIONpublic final static intAXIS_VSCROLLpublic final static intAXIS_HSCROLLpublic final static intAXIS_Zpublic final static intAXIS_RXpublic final static intAXIS_RYpublic final static intAXIS_RZpublic final static intAXIS_HAT_Xpublic final static intAXIS_HAT_Ypublic final static intAXIS_LTRIGGERpublic final static intAXIS_RTRIGGERpublic final static intAXIS_THROTTLEpublic final static intAXIS_RUDDERpublic final static intAXIS_WHEELpublic final static intAXIS_GASpublic final static intAXIS_BRAKEpublic final static intAXIS_DISTANCEpublic final static intAXIS_TILTpublic final static intAXIS_SCROLLpublic final static intAXIS_RELATIVE_Xpublic final static intAXIS_RELATIVE_Ypublic final static intAXIS_GENERIC_1public final static intAXIS_GENERIC_2public final static intAXIS_GENERIC_3public final static intAXIS_GENERIC_4public final static intAXIS_GENERIC_5public final static intAXIS_GENERIC_6public final static intAXIS_GENERIC_7public final static intAXIS_GENERIC_8public final static intAXIS_GENERIC_9public final static intAXIS_GENERIC_10public final static intAXIS_GENERIC_11public final static intAXIS_GENERIC_12public final static intAXIS_GENERIC_13public final static intAXIS_GENERIC_14public final static intAXIS_GENERIC_15public final static intAXIS_GENERIC_16public final static intBUTTON_PRIMARY
-
Method Summary
Modifier and Type Method Description static intgetActionMasked(MotionEvent event)Call getAction, returning only the ACTION_MASK portion. static intgetActionIndex(MotionEvent event)Call getAction, returning only the pointer indexportion. static intfindPointerIndex(MotionEvent event, int pointerId)Call findPointerIndex. static intgetPointerId(MotionEvent event, int pointerIndex)Call getPointerId. static floatgetX(MotionEvent event, int pointerIndex)Call getX. static floatgetY(MotionEvent event, int pointerIndex)Call getY. static intgetPointerCount(MotionEvent event)The number of pointers of data contained in this event. static intgetSource(MotionEvent event)Gets the source of the event. static booleanisFromSource(MotionEvent event, int source)Determines whether the event is from the given source. static floatgetAxisValue(MotionEvent event, int axis)Get axis value for the first pointer index (may be anarbitrary pointer identifier). static floatgetAxisValue(MotionEvent event, int axis, int pointerIndex)Returns the value of the requested axis for the given pointer index(use getPointerId to find the pointer identifier for this index). static intgetButtonState(MotionEvent event)-
-
Method Detail
-
getActionMasked
@Deprecated() static int getActionMasked(MotionEvent event)
Call getAction, returning only the ACTION_MASK portion.
-
getActionIndex
@Deprecated() static int getActionIndex(MotionEvent event)
Call getAction, returning only the pointer indexportion.
-
findPointerIndex
@Deprecated() static int findPointerIndex(MotionEvent event, int pointerId)
Call findPointerIndex.
-
getPointerId
@Deprecated() static int getPointerId(MotionEvent event, int pointerIndex)
Call getPointerId.
-
getX
@Deprecated() static float getX(MotionEvent event, int pointerIndex)
Call getX.
-
getY
@Deprecated() static float getY(MotionEvent event, int pointerIndex)
Call getY.
-
getPointerCount
@Deprecated() static int getPointerCount(MotionEvent event)
The number of pointers of data contained in this event. Always
-
getSource
@Deprecated() static int getSource(MotionEvent event)
Gets the source of the event.
-
isFromSource
static boolean isFromSource(MotionEvent event, int source)
Determines whether the event is from the given source.
- Parameters:
source- The input source to check against.
-
getAxisValue
@Deprecated() static float getAxisValue(MotionEvent event, int axis)
Get axis value for the first pointer index (may be anarbitrary pointer identifier).
- Parameters:
axis- The axis identifier for the axis value to retrieve.
-
getAxisValue
@Deprecated() static float getAxisValue(MotionEvent event, int axis, int pointerIndex)
Returns the value of the requested axis for the given pointer index(use getPointerId to find the pointer identifier for this index).
- Parameters:
axis- The axis identifier for the axis value to retrieve.pointerIndex- Raw index of pointer to retrieve.
-
getButtonState
@Deprecated() static int getButtonState(MotionEvent event)
-
-
-
-