| java.lang.Object | |
| ↳ | androidx.test.core.view.MotionEventBuilder |
A helper builder for creating MotionEvent's.
Default values for unspecified attributes are 0 unless otherwise noted.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns a MotionEvent with the provided data or reasonable defaults.
| |||||||||||
Start building a new MotionEvent.
| |||||||||||
Sets the action.
| |||||||||||
Sets the pointer index associated with the action.
| |||||||||||
Sets the button state.
| |||||||||||
Sets the device id.
| |||||||||||
Sets the down time.
| |||||||||||
Sets the edge flags.
| |||||||||||
Sets the event time.
| |||||||||||
Sets the flags.
| |||||||||||
Sets the metaState.
| |||||||||||
An expanded variant of
setPointer(float, float) that supports specifying all pointer
properties and coords data. | |||||||||||
Simple mechanism to add a pointer to the MotionEvent.
| |||||||||||
Sets the source.
| |||||||||||
Sets the x precision.
| |||||||||||
Sets the y precision.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||||
Returns a MotionEvent with the provided data or reasonable defaults.
| Returns | |
|---|---|
MotionEvent |
|
Start building a new MotionEvent.
| Returns | |
|---|---|
MotionEventBuilder |
a new MotionEventBuilder. |
Sets the action. Default is ERROR(/MotionEvent.ACTION_DOWN).
| Parameters | |
|---|---|
action |
int |
| Returns | |
|---|---|
MotionEventBuilder |
|
See also:
Sets the pointer index associated with the action.
| Parameters | |
|---|---|
pointerIndex |
int |
| Returns | |
|---|---|
MotionEventBuilder |
|
See also:
Sets the event time. Default is SystemClock.uptimeMillis().
| Parameters | |
|---|---|
eventTime |
long |
| Returns | |
|---|---|
MotionEventBuilder |
|
See also:
An expanded variant of setPointer(float, float) that supports specifying all pointer
properties and coords data.
| Parameters | |
|---|---|
pointerProperties |
MotionEvent.PointerProperties |
pointerCoords |
MotionEvent.PointerCoords |
| Returns | |
|---|---|
MotionEventBuilder |
|
Simple mechanism to add a pointer to the MotionEvent.
Can be called multiple times to add multiple pointers to the event.
| Parameters | |
|---|---|
x |
float |
y |
float |
| Returns | |
|---|---|
MotionEventBuilder |
|