public class TransformedMotionEvent
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TransformedMotionEvent.TransformDiff |
Constructor and Description |
---|
TransformedMotionEvent(MotionEvent event) |
TransformedMotionEvent(MotionEvent event,
Matrix matrix) |
Modifier and Type | Method and Description |
---|---|
int |
getActionMasked()
Return the kind of action being performed.
|
int |
getPointerCount()
The number of pointers of data contained in this event.
|
float[] |
getPosition(int index)
Get the transformed pos of the point.
|
void |
getPosition(int index,
float[] dest)
Get the transformed pos of the point.
|
MotionEvent |
getRawEvent() |
TransformedMotionEvent |
getScreenEvent() |
TransformedMotionEvent.TransformDiff |
getTransformDifference()
Return the differences to the checkpoint.
|
boolean |
hasClicked()
Check if the event is a click.
|
boolean |
hasDoubleTapped() |
boolean |
hasFixedCenterPoint()
Return if the event has a fixed center point to emulate a multitouch rotating and scaling Event.
|
boolean |
isCheckpoint()
If this return true you must save your current state.
|
boolean |
isRelease() |
void |
setFixedCenterPoint(float[] pos)
Set a center point to emulate a multitouch rotating and scaling Event
|
void |
setFixedCenterPoint(float x,
float y)
Set a center point to emulate a multitouch rotating and scaling Event
|
public TransformedMotionEvent(MotionEvent event)
public TransformedMotionEvent(MotionEvent event, Matrix matrix)
public int getActionMasked()
getActionMasked()
and MotionEvent#getActionIndex
to retrieve
the separate masked action and pointer index.MotionEvent#ACTION_DOWN
or
the combination of MotionEvent#ACTION_POINTER_DOWN
with a shifted pointer index.public int getPointerCount()
public float[] getPosition(int index)
index
- point index @see #getPointerCountpublic void getPosition(int index, float[] dest)
index
- point index @see #getPointerCountpublic MotionEvent getRawEvent()
public TransformedMotionEvent getScreenEvent()
@Nullable public TransformedMotionEvent.TransformDiff getTransformDifference()
public boolean hasClicked()
public boolean hasDoubleTapped()
public boolean hasFixedCenterPoint()
public boolean isCheckpoint()
getTransformDifference()
public boolean isRelease()
public void setFixedCenterPoint(float[] pos)
pos
- center point array {x, y}.public void setFixedCenterPoint(float x, float y)
x
- center point x.y
- center point y.