android.view
Class MotionEvent
java.lang.Object
android.view.MotionEvent
- All Implemented Interfaces:
- Parcelable
public final class MotionEvent
- extends java.lang.Object
- implements Parcelable
|
Method Summary |
void |
addBatch(long eventTime,
float x,
float y,
float pressure,
float size,
int metaState)
|
int |
describeContents()
|
int |
findPointerIndex(int pointerId)
|
int |
getAction()
|
int |
getDeviceId()
|
long |
getDownTime()
|
int |
getEdgeFlags()
|
long |
getEventTime()
|
long |
getHistoricalEventTime(int pos)
|
float |
getHistoricalPressure(int pos)
|
float |
getHistoricalPressure(int pointerIndex,
int pos)
|
float |
getHistoricalSize(int pos)
|
float |
getHistoricalSize(int pointerIndex,
int pos)
|
float |
getHistoricalX(int pos)
|
float |
getHistoricalX(int pointerIndex,
int pos)
|
float |
getHistoricalY(int pos)
|
float |
getHistoricalY(int pointerIndex,
int pos)
|
int |
getHistorySize()
|
int |
getMetaState()
|
int |
getPointerCount()
|
int |
getPointerId(int pointerIndex)
|
float |
getPressure()
|
float |
getPressure(int pointerIndex)
|
float |
getRawX()
|
float |
getRawY()
|
float |
getSize()
|
float |
getSize(int pointerIndex)
|
float |
getX()
|
float |
getX(int pointerIndex)
|
float |
getXPrecision()
|
float |
getY()
|
float |
getY(int pointerIndex)
|
float |
getYPrecision()
|
static MotionEvent |
obtain(long downTime,
long eventTime,
int action,
float x,
float y,
float pressure,
float size,
int metaState,
float xPrecision,
float yPrecision,
int deviceId,
int edgeFlags)
|
static MotionEvent |
obtain(long downTime,
long eventTime,
int action,
float x,
float y,
int metaState)
|
static MotionEvent |
obtain(long downTime,
long eventTime,
int action,
int pointers,
float x,
float y,
float pressure,
float size,
int metaState,
float xPrecision,
float yPrecision,
int deviceId,
int edgeFlags)
|
static MotionEvent |
obtain(MotionEvent o)
|
static MotionEvent |
obtainNoHistory(MotionEvent o)
|
void |
offsetLocation(float deltaX,
float deltaY)
|
void |
recycle()
|
void |
setAction(int action)
|
void |
setEdgeFlags(int flags)
|
void |
setLocation(float x,
float y)
|
java.lang.String |
toString()
|
void |
writeToParcel(Parcel out,
int flags)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ACTION_MASK
public static final int ACTION_MASK
- See Also:
- Constant Field Values
ACTION_DOWN
public static final int ACTION_DOWN
- See Also:
- Constant Field Values
ACTION_UP
public static final int ACTION_UP
- See Also:
- Constant Field Values
ACTION_MOVE
public static final int ACTION_MOVE
- See Also:
- Constant Field Values
ACTION_CANCEL
public static final int ACTION_CANCEL
- See Also:
- Constant Field Values
ACTION_OUTSIDE
public static final int ACTION_OUTSIDE
- See Also:
- Constant Field Values
ACTION_POINTER_DOWN
public static final int ACTION_POINTER_DOWN
- See Also:
- Constant Field Values
ACTION_POINTER_1_DOWN
public static final int ACTION_POINTER_1_DOWN
- See Also:
- Constant Field Values
ACTION_POINTER_2_DOWN
public static final int ACTION_POINTER_2_DOWN
- See Also:
- Constant Field Values
ACTION_POINTER_3_DOWN
public static final int ACTION_POINTER_3_DOWN
- See Also:
- Constant Field Values
ACTION_POINTER_UP
public static final int ACTION_POINTER_UP
- See Also:
- Constant Field Values
ACTION_POINTER_1_UP
public static final int ACTION_POINTER_1_UP
- See Also:
- Constant Field Values
ACTION_POINTER_2_UP
public static final int ACTION_POINTER_2_UP
- See Also:
- Constant Field Values
ACTION_POINTER_3_UP
public static final int ACTION_POINTER_3_UP
- See Also:
- Constant Field Values
ACTION_POINTER_ID_MASK
public static final int ACTION_POINTER_ID_MASK
- See Also:
- Constant Field Values
ACTION_POINTER_ID_SHIFT
public static final int ACTION_POINTER_ID_SHIFT
- See Also:
- Constant Field Values
EDGE_TOP
public static final int EDGE_TOP
- See Also:
- Constant Field Values
EDGE_BOTTOM
public static final int EDGE_BOTTOM
- See Also:
- Constant Field Values
EDGE_LEFT
public static final int EDGE_LEFT
- See Also:
- Constant Field Values
EDGE_RIGHT
public static final int EDGE_RIGHT
- See Also:
- Constant Field Values
CREATOR
public static final Parcelable.Creator<MotionEvent> CREATOR
obtain
public static MotionEvent obtain(long downTime,
long eventTime,
int action,
float x,
float y,
float pressure,
float size,
int metaState,
float xPrecision,
float yPrecision,
int deviceId,
int edgeFlags)
obtain
public static MotionEvent obtain(long downTime,
long eventTime,
int action,
int pointers,
float x,
float y,
float pressure,
float size,
int metaState,
float xPrecision,
float yPrecision,
int deviceId,
int edgeFlags)
obtain
public static MotionEvent obtain(long downTime,
long eventTime,
int action,
float x,
float y,
int metaState)
obtain
public static MotionEvent obtain(MotionEvent o)
obtainNoHistory
public static MotionEvent obtainNoHistory(MotionEvent o)
recycle
public void recycle()
getAction
public final int getAction()
getDownTime
public final long getDownTime()
getEventTime
public final long getEventTime()
getX
public final float getX()
getY
public final float getY()
getPressure
public final float getPressure()
getSize
public final float getSize()
getPointerCount
public final int getPointerCount()
getPointerId
public final int getPointerId(int pointerIndex)
findPointerIndex
public final int findPointerIndex(int pointerId)
getX
public final float getX(int pointerIndex)
getY
public final float getY(int pointerIndex)
getPressure
public final float getPressure(int pointerIndex)
getSize
public final float getSize(int pointerIndex)
getMetaState
public final int getMetaState()
getRawX
public final float getRawX()
getRawY
public final float getRawY()
getXPrecision
public final float getXPrecision()
getYPrecision
public final float getYPrecision()
getHistorySize
public final int getHistorySize()
getHistoricalEventTime
public final long getHistoricalEventTime(int pos)
getHistoricalX
public final float getHistoricalX(int pos)
getHistoricalY
public final float getHistoricalY(int pos)
getHistoricalPressure
public final float getHistoricalPressure(int pos)
getHistoricalSize
public final float getHistoricalSize(int pos)
getHistoricalX
public final float getHistoricalX(int pointerIndex,
int pos)
getHistoricalY
public final float getHistoricalY(int pointerIndex,
int pos)
getHistoricalPressure
public final float getHistoricalPressure(int pointerIndex,
int pos)
getHistoricalSize
public final float getHistoricalSize(int pointerIndex,
int pos)
getDeviceId
public final int getDeviceId()
getEdgeFlags
public final int getEdgeFlags()
setEdgeFlags
public final void setEdgeFlags(int flags)
setAction
public final void setAction(int action)
offsetLocation
public final void offsetLocation(float deltaX,
float deltaY)
setLocation
public final void setLocation(float x,
float y)
addBatch
public final void addBatch(long eventTime,
float x,
float y,
float pressure,
float size,
int metaState)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
describeContents
public int describeContents()
- Specified by:
describeContents in interface Parcelable
writeToParcel
public void writeToParcel(Parcel out,
int flags)
- Specified by:
writeToParcel in interface Parcelable
Copyright © 2008-2010. All Rights Reserved.