|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.support.v4.view.MotionEventCompat
public class MotionEventCompat
Helper for accessing features in MotionEvent
introduced
after API level 4 in a backwards compatible fashion.
Field Summary | |
---|---|
static int |
ACTION_HOVER_ENTER
Constant for getActionMasked(MotionEvent) : The pointer is not down but has entered the
boundaries of a window or view. |
static int |
ACTION_HOVER_EXIT
Constant for getActionMasked(MotionEvent) : The pointer is not down but has exited the
boundaries of a window or view. |
static int |
ACTION_HOVER_MOVE
Synonym for MotionEvent#ACTION_HOVER_MOVE . |
static int |
ACTION_MASK
Synonym for MotionEvent#ACTION_MASK . |
static int |
ACTION_POINTER_DOWN
Synonym for MotionEvent#ACTION_POINTER_DOWN . |
static int |
ACTION_POINTER_INDEX_MASK
Synonym for MotionEvent#ACTION_POINTER_INDEX_MASK . |
static int |
ACTION_POINTER_INDEX_SHIFT
Synonym for MotionEvent#ACTION_POINTER_INDEX_SHIFT . |
static int |
ACTION_POINTER_UP
Synonym for MotionEvent#ACTION_POINTER_UP . |
static int |
ACTION_SCROLL
Synonym for MotionEvent#ACTION_SCROLL . |
Constructor Summary | |
---|---|
MotionEventCompat()
|
Method Summary | |
---|---|
static int |
findPointerIndex(MotionEvent event,
int pointerId)
Call MotionEvent#findPointerIndex(int) . |
static int |
getActionIndex(MotionEvent event)
Call MotionEvent#getAction , returning only the pointer index
portion |
static int |
getActionMasked(MotionEvent event)
Call MotionEvent#getAction , returning only the ACTION_MASK
portion. |
static int |
getPointerId(MotionEvent event,
int pointerIndex)
Call MotionEvent#getPointerId(int) . |
static float |
getX(MotionEvent event,
int pointerIndex)
Call MotionEvent#getX(int) . |
static float |
getY(MotionEvent event,
int pointerIndex)
Call MotionEvent#getY(int) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ACTION_MASK
MotionEvent#ACTION_MASK
.
public static final int ACTION_POINTER_DOWN
MotionEvent#ACTION_POINTER_DOWN
.
public static final int ACTION_POINTER_UP
MotionEvent#ACTION_POINTER_UP
.
public static final int ACTION_HOVER_MOVE
MotionEvent#ACTION_HOVER_MOVE
.
public static final int ACTION_SCROLL
MotionEvent#ACTION_SCROLL
.
public static final int ACTION_POINTER_INDEX_MASK
MotionEvent#ACTION_POINTER_INDEX_MASK
.
public static final int ACTION_POINTER_INDEX_SHIFT
MotionEvent#ACTION_POINTER_INDEX_SHIFT
.
public static final int ACTION_HOVER_ENTER
getActionMasked(MotionEvent)
: The pointer is not down but has entered the
boundaries of a window or view.
This action is always delivered to the window or view under the pointer.
This action is not a touch event so it is delivered to
android.view.View#onGenericMotionEvent(MotionEvent)
rather than
android.view.View#onTouchEvent(MotionEvent)
.
public static final int ACTION_HOVER_EXIT
getActionMasked(MotionEvent)
: The pointer is not down but has exited the
boundaries of a window or view.
This action is always delivered to the window or view that was previously under the pointer.
This action is not a touch event so it is delivered to
android.view.View#onGenericMotionEvent(MotionEvent)
rather than
android.view.View#onTouchEvent(MotionEvent)
.
Constructor Detail |
---|
public MotionEventCompat()
Method Detail |
---|
public static int getActionMasked(MotionEvent event)
MotionEvent#getAction
, returning only the ACTION_MASK
portion.
public static int getActionIndex(MotionEvent event)
MotionEvent#getAction
, returning only the pointer index
portion
public static int findPointerIndex(MotionEvent event, int pointerId)
MotionEvent#findPointerIndex(int)
.
If running on a pre-android.os.Build.VERSION_CODES#ECLAIR
device,
does nothing and returns -1.
public static int getPointerId(MotionEvent event, int pointerIndex)
MotionEvent#getPointerId(int)
.
If running on a pre-android.os.Build.VERSION_CODES#ECLAIR
device,
IndexOutOfBoundsException
is thrown.
public static float getX(MotionEvent event, int pointerIndex)
MotionEvent#getX(int)
.
If running on a pre-android.os.Build.VERSION_CODES#ECLAIR
device,
IndexOutOfBoundsException
is thrown.
public static float getY(MotionEvent event, int pointerIndex)
MotionEvent#getY(int)
.
If running on a pre-android.os.Build.VERSION_CODES#ECLAIR
device,
IndexOutOfBoundsException
is thrown.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |