{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
public final class MotionEventSubject
Subject for MotionEvent.
Public constructors |
|
|---|---|
Public methods |
|
|---|---|
static MotionEventSubject |
assertThat(MotionEvent event) |
void |
hasAction(int action) |
void |
hasActionButton(int actionButton)Check the value of MotionEvent#getActionButton() |
void |
hasButtonState(int buttonState) |
void |
hasDeviceId(int deviceId) |
void |
hasDownTime(long downTime) |
void |
hasEdgeFlags(int edgeFlags) |
void |
hasEventTime(long eventTime) |
void |
hasFlags(int flags) |
void |
hasHistorySize(int historySize) |
void |
hasMetaState(int metaState) |
void |
hasPointerCount(int pointerCount) |
LongSubject |
historicalEventTime(int pos) |
FloatSubject |
historicalOrientation(int pos) |
PointerCoordsSubject |
historicalPointerCoords(int pointerIndex, int pos) |
FloatSubject |
historicalPressure(int pos) |
FloatSubject |
historicalSize(int pos) |
FloatSubject |
historicalToolMajor(int pos) |
FloatSubject |
historicalToolMinor(int pos) |
FloatSubject |
historicalTouchMajor(int pos) |
FloatSubject |
historicalTouchMinor(int pos) |
FloatSubject |
historicalX(int pos) |
FloatSubject |
historicalY(int pos) |
static Factory<MotionEventSubject, MotionEvent> |
|
FloatSubject |
|
FloatSubject |
orientation(int pointerIndex) |
PointerCoordsSubject |
pointerCoords(int pointerIndex) |
IntegerSubject |
pointerId(int pointerIndex) |
PointerPropertiesSubject |
pointerProperties(int pointerIndex) |
FloatSubject |
pressure() |
FloatSubject |
pressure(int pointerIndex) |
FloatSubject |
rawX() |
FloatSubject |
rawY() |
FloatSubject |
size() |
FloatSubject |
size(int pointerIndex) |
FloatSubject |
|
FloatSubject |
toolMajor(int pointerIndex) |
FloatSubject |
|
FloatSubject |
toolMinor(int pointerIndex) |
FloatSubject |
|
FloatSubject |
touchMajor(int pointerIndex) |
FloatSubject |
|
FloatSubject |
touchMinor(int pointerIndex) |
FloatSubject |
x() |
FloatSubject |
x(int pointerIndex) |
FloatSubject |
|
FloatSubject |
y() |
FloatSubject |
y(int pointerIndex) |
FloatSubject |
|
public void hasActionButton(int actionButton)
Check the value of MotionEvent#getActionButton()
| Throws | |
|---|---|
java.lang.IllegalStateException java.lang.IllegalStateException |
if called on below Android API 23 |
public PointerCoordsSubject historicalPointerCoords(int pointerIndex, int pos)