|
||||||||||
| 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(android.view.MotionEvent): The pointer is not down but has entered the
boundaries of a window or view. |
static int |
ACTION_HOVER_EXIT
Constant for getActionMasked(android.view.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(android.view.MotionEvent event,
int pointerId)
Call MotionEvent.findPointerIndex(int). |
static int |
getActionIndex(android.view.MotionEvent event)
Call MotionEvent.getAction(), returning only the pointer index
portion |
static int |
getActionMasked(android.view.MotionEvent event)
Call MotionEvent.getAction(), returning only the ACTION_MASK
portion. |
static int |
getPointerCount(android.view.MotionEvent event)
The number of pointers of data contained in this event. |
static int |
getPointerId(android.view.MotionEvent event,
int pointerIndex)
Call MotionEvent.getPointerId(int). |
static float |
getX(android.view.MotionEvent event,
int pointerIndex)
Call MotionEvent.getX(int). |
static float |
getY(android.view.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(android.view.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
View.onGenericMotionEvent(MotionEvent) rather than
View.onTouchEvent(MotionEvent).
public static final int ACTION_HOVER_EXIT
getActionMasked(android.view.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
View.onGenericMotionEvent(MotionEvent) rather than
View.onTouchEvent(MotionEvent).
| Constructor Detail |
|---|
public MotionEventCompat()
| Method Detail |
|---|
public static int getActionMasked(android.view.MotionEvent event)
MotionEvent.getAction(), returning only the ACTION_MASK
portion.
public static int getActionIndex(android.view.MotionEvent event)
MotionEvent.getAction(), returning only the pointer index
portion
public static int findPointerIndex(android.view.MotionEvent event,
int pointerId)
MotionEvent.findPointerIndex(int).
If running on a pre-Build.VERSION_CODES.ECLAIR device,
does nothing and returns -1.
public static int getPointerId(android.view.MotionEvent event,
int pointerIndex)
MotionEvent.getPointerId(int).
If running on a pre-Build.VERSION_CODES.ECLAIR device,
IndexOutOfBoundsException is thrown.
public static float getX(android.view.MotionEvent event,
int pointerIndex)
MotionEvent.getX(int).
If running on a pre-Build.VERSION_CODES.ECLAIR device,
IndexOutOfBoundsException is thrown.
public static float getY(android.view.MotionEvent event,
int pointerIndex)
MotionEvent.getY(int).
If running on a pre-Build.VERSION_CODES.ECLAIR device,
IndexOutOfBoundsException is thrown.
public static int getPointerCount(android.view.MotionEvent event)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||