Android.Views.MotionEvent Members

The members of Android.Views.MotionEvent are listed below.

See Also: Inherited members from Android.Views.InputEvent

Public Fields

const
ButtonBackMotionEventButtonState (8). Button constant: Back button pressed (mouse back button).
const
ButtonForwardMotionEventButtonState (16). Button constant: Forward button pressed (mouse forward button).
const
ButtonPrimaryMotionEventButtonState (1). Button constant: Primary button (left mouse button).
const
ButtonSecondaryMotionEventButtonState (2). Button constant: Secondary button (right mouse button, stylus first button).
const
ButtonTertiaryMotionEventButtonState (4). Button constant: Tertiary button (middle mouse button, stylus second button).
const
FlagWindowIsObscuredMotionEventFlags (1). This flag indicates that the window that received this motion event is partly or wholly obscured by another visible window above it.
const
InvalidPointerIdint (-1). An invalid pointer id.
const
ToolTypeEraserMotionEventToolType (4). Tool type constant: The tool is an eraser or a stylus being used in an inverted posture.
const
ToolTypeFingerMotionEventToolType (1). Tool type constant: The tool is a finger.
const
ToolTypeMouseMotionEventToolType (3). Tool type constant: The tool is a mouse or trackpad.
const
ToolTypeStylusMotionEventToolType (2). Tool type constant: The tool is a stylus.
const
ToolTypeUnknownMotionEventToolType (0). Tool type constant: Unknown tool type.

Public Properties

ActionMotionEventActions. Return the kind of action being performed.
[read-only]
ActionIndexint. For MotionEvent.ACTION_POINTER_DOWN or MotionEvent.ACTION_POINTER_UP as returned by MotionEvent.ActionMasked, this returns the associated pointer index.
[read-only]
ActionMaskedMotionEventActions. Return the masked action being performed, without pointer index information.
[read-only]
ButtonStateMotionEventButtonState. Gets the state of all buttons that are pressed such as a mouse or stylus button.
[read-only]
static
CreatorAndroid.OS.IParcelableCreator.
[read-only]
override
DeviceIdint. Gets the id for the device that this event came from.
[read-only]
DownTimelong. Returns the time (in ms) when the user originally pressed down to start a stream of position events.
EdgeFlagsEdge. Returns a bitfield indicating which edges, if any, were touched by this MotionEvent.
[read-only]
override
EventTimelong. Retrieve the time this event occurred, in the Android.OS.SystemClock.UptimeMillis time base.
[read-only]
FlagsMotionEventFlags. Gets the motion event flags.
[read-only]
HistorySizeint. Returns the number of historical points in this event.
[read-only]
MetaStateMetaKeyStates. Returns the state of any meta / modifier keys that were in effect when the event was generated.
[read-only]
Orientationfloat. MotionEvent.GetOrientation(int) for the first pointer index (may be an arbitrary pointer identifier).
[read-only]
PointerCountint. The number of pointers of data contained in this event.
[read-only]
Pressurefloat. MotionEvent.GetPressure(int) for the first pointer index (may be an arbitrary pointer identifier).
[read-only]
RawXfloat. Returns the original raw X coordinate of this event.
[read-only]
RawYfloat. Returns the original raw Y coordinate of this event.
[read-only]
Sizefloat. MotionEvent.GetSize(int) for the first pointer index (may be an arbitrary pointer identifier).
[read-only]
override
SourceInputSourceType. Gets the source of the event.
[read-only]
ToolMajorfloat. MotionEvent.GetToolMajor(int) for the first pointer index (may be an arbitrary pointer identifier).
[read-only]
ToolMinorfloat. MotionEvent.GetToolMinor(int) for the first pointer index (may be an arbitrary pointer identifier).
[read-only]
TouchMajorfloat. MotionEvent.GetTouchMajor(int) for the first pointer index (may be an arbitrary pointer identifier).
[read-only]
TouchMinorfloat. MotionEvent.GetTouchMinor(int) for the first pointer index (may be an arbitrary pointer identifier).
[read-only]
XPrecisionfloat. Return the precision of the X coordinates being reported.
[read-only]
YPrecisionfloat. Return the precision of the Y coordinates being reported.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

static
ActionToString(MotionEventActions) : string
Returns a string that represents the symbolic name of the specified unmasked action such as "ACTION_DOWN", "ACTION_POINTER_DOWN(3)" or an equivalent numeric constant such as "35" if unknown.
AddBatch(long, MotionEvent.PointerCoords[], MetaKeyStates)
Add a new movement to the batch of movements in this event.
AddBatch(long, float, float, float, float, MetaKeyStates)
Add a new movement to the batch of movements in this event.
static
AxisFromString(string) : Axis
Gets an axis by its symbolic name such as "AXIS_X" or an equivalent numeric constant such as "42".
static
AxisToString(Axis) : string
Returns a string that represents the symbolic name of the specified axis such as "AXIS_X" or an equivalent numeric constant such as "42" if unknown.
override
DescribeContents() : int
Documentation for this section has not yet been entered.
FindPointerIndex(int) : int
Given a pointer identifier, find the index of its data in the event.
GetAxisValue(Axis) : float
MotionEvent.GetAxisValue(Axis) for the first pointer index (may be an arbitrary pointer identifier).
GetAxisValue(Axis, int) : float
Returns the value of the requested axis for the given pointer index (use MotionEvent.GetPointerId(int) to find the pointer identifier for this index).
GetHistoricalAxisValue(Axis, int) : float
MotionEvent.GetHistoricalAxisValue(Axis, System.Int32, System.Int32) for the first pointer index (may be an arbitrary pointer identifier).
GetHistoricalAxisValue(Axis, int, int) : float
Returns the historical value of the requested axis, as per MotionEvent.GetAxisValue(Axis, System.Int32), occurred between this event and the previous event for the given pointer.
GetHistoricalEventTime(int) : long
Returns the time that a historical movement occurred between this event and the previous event, in the Android.OS.SystemClock.UptimeMillis time base.
GetHistoricalOrientation(int) : float
MotionEvent.GetHistoricalOrientation(int, System.Int32) for the first pointer index (may be an arbitrary pointer identifier).
GetHistoricalOrientation(int, int) : float
Returns a historical orientation coordinate, as per MotionEvent.GetOrientation(int), that occurred between this event and the previous event for the given pointer.
GetHistoricalPointerCoords(int, int, MotionEvent.PointerCoords)
Populates a NoType:android/view/MotionEvent$PointerCoords;Href=../../../reference/android/view/MotionEvent.PointerCoords.html object with historical pointer coordinate data, as per MotionEvent.GetPointerCoords(int, .PointerCoords), that occurred between this event and the previous event for the given pointer.
GetHistoricalPressure(int) : float
MotionEvent.GetHistoricalPressure(int, System.Int32) for the first pointer index (may be an arbitrary pointer identifier).
GetHistoricalPressure(int, int) : float
Returns a historical pressure coordinate, as per MotionEvent.GetPressure(int), that occurred between this event and the previous event for the given pointer.
GetHistoricalSize(int) : float
MotionEvent.GetHistoricalSize(int, System.Int32) for the first pointer index (may be an arbitrary pointer identifier).
GetHistoricalSize(int, int) : float
Returns a historical size coordinate, as per MotionEvent.GetSize(int), that occurred between this event and the previous event for the given pointer.
GetHistoricalToolMajor(int) : float
MotionEvent.GetHistoricalToolMajor(int, System.Int32) for the first pointer index (may be an arbitrary pointer identifier).
GetHistoricalToolMajor(int, int) : float
Returns a historical tool major axis coordinate, as per MotionEvent.GetToolMajor(int), that occurred between this event and the previous event for the given pointer.
GetHistoricalToolMinor(int) : float
MotionEvent.GetHistoricalToolMinor(int, System.Int32) for the first pointer index (may be an arbitrary pointer identifier).
GetHistoricalToolMinor(int, int) : float
Returns a historical tool minor axis coordinate, as per MotionEvent.GetToolMinor(int), that occurred between this event and the previous event for the given pointer.
GetHistoricalTouchMajor(int) : float
MotionEvent.GetHistoricalTouchMajor(int, System.Int32) for the first pointer index (may be an arbitrary pointer identifier).
GetHistoricalTouchMajor(int, int) : float
Returns a historical touch major axis coordinate, as per MotionEvent.GetTouchMajor(int), that occurred between this event and the previous event for the given pointer.
GetHistoricalTouchMinor(int) : float
MotionEvent.GetHistoricalTouchMinor(int, System.Int32) for the first pointer index (may be an arbitrary pointer identifier).
GetHistoricalTouchMinor(int, int) : float
Returns a historical touch minor axis coordinate, as per MotionEvent.GetTouchMinor(int), that occurred between this event and the previous event for the given pointer.
GetHistoricalX(int) : float
MotionEvent.GetHistoricalX(int, System.Int32) for the first pointer index (may be an arbitrary pointer identifier).
GetHistoricalX(int, int) : float
Returns a historical X coordinate, as per MotionEvent.GetX(int), that occurred between this event and the previous event for the given pointer.
GetHistoricalY(int) : float
MotionEvent.GetHistoricalY(int, System.Int32) for the first pointer index (may be an arbitrary pointer identifier).
GetHistoricalY(int, int) : float
Returns a historical Y coordinate, as per MotionEvent.GetY(int), that occurred between this event and the previous event for the given pointer.
GetOrientation(int) : float
Returns the orientation of the touch area and tool area in radians clockwise from vertical for the given pointer index (use MotionEvent.GetPointerId(int) to find the pointer identifier for this index).
GetPointerCoords(int, MotionEvent.PointerCoords)
Populates a NoType:android/view/MotionEvent$PointerCoords;Href=../../../reference/android/view/MotionEvent.PointerCoords.html object with pointer coordinate data for the specified pointer index.
GetPointerId(int) : int
Return the pointer identifier associated with a particular pointer data index is this event.
GetPointerProperties(int, MotionEvent.PointerProperties)
Populates a NoType:android/view/MotionEvent$PointerProperties;Href=../../../reference/android/view/MotionEvent.PointerProperties.html object with pointer properties for the specified pointer index.
GetPressure(int) : float
Returns the current pressure of this event for the given pointer index (use MotionEvent.GetPointerId(int) to find the pointer identifier for this index).
GetSize(int) : float
Returns a scaled value of the approximate size for the given pointer index (use MotionEvent.GetPointerId(int) to find the pointer identifier for this index).
GetToolMajor(int) : float
Returns the length of the major axis of an ellipse that describes the size of the approaching tool for the given pointer index (use MotionEvent.GetPointerId(int) to find the pointer identifier for this index).
GetToolMinor(int) : float
Returns the length of the minor axis of an ellipse that describes the size of the approaching tool for the given pointer index (use MotionEvent.GetPointerId(int) to find the pointer identifier for this index).
GetToolType(int) : MotionEventToolType
Gets the tool type of a pointer for the given pointer index.
GetTouchMajor(int) : float
Returns the length of the major axis of an ellipse that describes the touch area at the point of contact for the given pointer index (use MotionEvent.GetPointerId(int) to find the pointer identifier for this index).
GetTouchMinor(int) : float
Returns the length of the minor axis of an ellipse that describes the touch area at the point of contact for the given pointer index (use MotionEvent.GetPointerId(int) to find the pointer identifier for this index).
GetX() : float
MotionEvent.GetX(int) for the first pointer index (may be an arbitrary pointer identifier).
GetX(int) : float
Returns the X coordinate of this event for the given pointer index (use MotionEvent.GetPointerId(int) to find the pointer identifier for this index).
GetY() : float
MotionEvent.GetY(int) for the first pointer index (may be an arbitrary pointer identifier).
GetY(int) : float
Returns the Y coordinate of this event for the given pointer index (use MotionEvent.GetPointerId(int) to find the pointer identifier for this index).
IsButtonPressed(MotionEventButtonState) : bool
Checks if a mouse or stylus button (or combination of buttons) is pressed.
static
Obtain(MotionEvent) : MotionEvent
Create a new MotionEvent, copying from an existing one.
static
Obtain(long, long, MotionEventActions, float, float, float, float, MetaKeyStates, float, float, int, Edge) : MotionEvent
Create a new MotionEvent, filling in all of the basic values that define the motion.
static
Obtain(long, long, int, float, float, float, float, MetaKeyStates, float, float, int, Edge) : MotionEvent
Documentation for this section has not yet been entered.
static
Obtain(long, long, MotionEventActions, int, int[], MotionEvent.PointerCoords[], MetaKeyStates, float, float, int, Edge, InputSourceType, MotionEventFlags) : MotionEvent
Create a new MotionEvent, filling in all of the basic values that define the motion.
static
Obtain(long, long, MotionEventActions, int, float, float, float, float, MetaKeyStates, float, float, int, Edge) : MotionEvent
Create a new MotionEvent, filling in all of the basic values that define the motion.
static
Obtain(long, long, int, int, int[], MotionEvent.PointerCoords[], MetaKeyStates, float, float, int, Edge, int, int) : MotionEvent
Documentation for this section has not yet been entered.
static
Obtain(long, long, int, int, float, float, float, float, MetaKeyStates, float, float, int, Edge) : MotionEvent
Documentation for this section has not yet been entered.
static
Obtain(long, long, MotionEventActions, int, MotionEvent.PointerProperties[], MotionEvent.PointerCoords[], MetaKeyStates, MotionEventButtonState, float, float, int, Edge, InputSourceType, MotionEventFlags) : MotionEvent
Create a new MotionEvent, filling in all of the basic values that define the motion.
static
Obtain(long, long, MotionEventActions, float, float, MetaKeyStates) : MotionEvent
Create a new MotionEvent, filling in a subset of the basic motion values.
static
Obtain(long, long, int, float, float, MetaKeyStates) : MotionEvent
Documentation for this section has not yet been entered.
static
ObtainNoHistory(MotionEvent) : MotionEvent
Create a new MotionEvent, copying from an existing one, but not including any historical point information.
OffsetLocation(float, float)
Adjust this event's location.
Recycle()
Recycle the MotionEvent, to be re-used by a later caller.
SetLocation(float, float)
Set this event's location.
SetSource(InputSourceType)
Modifies the source of the event.
Transform(Android.Graphics.Matrix)
Applies a transformation matrix to all of the points in the event.
override
WriteToParcel(Android.OS.Parcel, Android.OS.ParcelableWriteFlags)
Flatten this object in to a Parcel.