public final class

MotionEventSubject

extends Subject<MotionEventSubjectMotionEvent>
java.lang.Object
   ↳ com.google.common.truth.Subject<androidx.test.ext.truth.view.MotionEventSubjectandroid.view.MotionEvent>
     ↳ androidx.test.ext.truth.view.MotionEventSubject

Class Overview

Subject for MotionEvent.

Summary

Public Methods
static MotionEventSubject assertThat(MotionEvent event)
void hasAction(int action)
void hasActionButton(int actionButton)
Check the value of 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<MotionEventSubjectMotionEvent> motionEvents()
FloatSubject orientation()
FloatSubject orientation(int pointerIndex)
PointerCoordsSubject pointerCoords(int pointerIndex)
IntegerSubject pointerId(int pointerIndex)
PointerPropertiesSubject pointerProperties(int pointerIndex)
FloatSubject pressure(int pointerIndex)
FloatSubject pressure()
FloatSubject rawX()
FloatSubject rawY()
FloatSubject size(int pointerIndex)
FloatSubject size()
FloatSubject toolMajor()
FloatSubject toolMajor(int pointerIndex)
FloatSubject toolMinor(int pointerIndex)
FloatSubject toolMinor()
FloatSubject touchMajor()
FloatSubject touchMajor(int pointerIndex)
FloatSubject touchMinor()
FloatSubject touchMinor(int pointerIndex)
FloatSubject x(int pointerIndex)
FloatSubject x()
FloatSubject xPrecision()
FloatSubject y(int pointerIndex)
FloatSubject y()
FloatSubject yPrecision()
[Expand]
Inherited Methods
From class com.google.common.truth.Subject
From class java.lang.Object

Public Methods

public static MotionEventSubject assertThat (MotionEvent event)

Parameters
event MotionEvent
Returns
MotionEventSubject

public void hasAction (int action)

Parameters
action int

public void hasActionButton (int actionButton)

Check the value of getActionButton()

Parameters
actionButton int
Throws
IllegalStateException if called on below Android API 23

public void hasButtonState (int buttonState)

Parameters
buttonState int

public void hasDeviceId (int deviceId)

Parameters
deviceId int

public void hasDownTime (long downTime)

Parameters
downTime long

public void hasEdgeFlags (int edgeFlags)

Parameters
edgeFlags int

public void hasEventTime (long eventTime)

Parameters
eventTime long

public void hasFlags (int flags)

Parameters
flags int

public void hasHistorySize (int historySize)

Parameters
historySize int

public void hasMetaState (int metaState)

Parameters
metaState int

public void hasPointerCount (int pointerCount)

Parameters
pointerCount int

public LongSubject historicalEventTime (int pos)

Parameters
pos int
Returns
LongSubject

public FloatSubject historicalOrientation (int pos)

Parameters
pos int
Returns
FloatSubject

public PointerCoordsSubject historicalPointerCoords (int pointerIndex, int pos)

Parameters
pointerIndex int
pos int
Returns
PointerCoordsSubject

public FloatSubject historicalPressure (int pos)

Parameters
pos int
Returns
FloatSubject

public FloatSubject historicalSize (int pos)

Parameters
pos int
Returns
FloatSubject

public FloatSubject historicalToolMajor (int pos)

Parameters
pos int
Returns
FloatSubject

public FloatSubject historicalToolMinor (int pos)

Parameters
pos int
Returns
FloatSubject

public FloatSubject historicalTouchMajor (int pos)

Parameters
pos int
Returns
FloatSubject

public FloatSubject historicalTouchMinor (int pos)

Parameters
pos int
Returns
FloatSubject

public FloatSubject historicalX (int pos)

Parameters
pos int
Returns
FloatSubject

public FloatSubject historicalY (int pos)

Parameters
pos int
Returns
FloatSubject

public static Factory<MotionEventSubjectMotionEvent> motionEvents ()

Returns
Factory<MotionEventSubjectMotionEvent>

public FloatSubject orientation ()

Returns
FloatSubject

public FloatSubject orientation (int pointerIndex)

Parameters
pointerIndex int
Returns
FloatSubject

public PointerCoordsSubject pointerCoords (int pointerIndex)

Parameters
pointerIndex int
Returns
PointerCoordsSubject

public IntegerSubject pointerId (int pointerIndex)

Parameters
pointerIndex int
Returns
IntegerSubject

public PointerPropertiesSubject pointerProperties (int pointerIndex)

Parameters
pointerIndex int
Returns
PointerPropertiesSubject

public FloatSubject pressure (int pointerIndex)

Parameters
pointerIndex int
Returns
FloatSubject

public FloatSubject pressure ()

Returns
FloatSubject

public FloatSubject rawX ()

Returns
FloatSubject

public FloatSubject rawY ()

Returns
FloatSubject

public FloatSubject size (int pointerIndex)

Parameters
pointerIndex int
Returns
FloatSubject

public FloatSubject size ()

Returns
FloatSubject

public FloatSubject toolMajor ()

Returns
FloatSubject

public FloatSubject toolMajor (int pointerIndex)

Parameters
pointerIndex int
Returns
FloatSubject

public FloatSubject toolMinor (int pointerIndex)

Parameters
pointerIndex int
Returns
FloatSubject

public FloatSubject toolMinor ()

Returns
FloatSubject

public FloatSubject touchMajor ()

Returns
FloatSubject

public FloatSubject touchMajor (int pointerIndex)

Parameters
pointerIndex int
Returns
FloatSubject

public FloatSubject touchMinor ()

Returns
FloatSubject

public FloatSubject touchMinor (int pointerIndex)

Parameters
pointerIndex int
Returns
FloatSubject

public FloatSubject x (int pointerIndex)

Parameters
pointerIndex int
Returns
FloatSubject

public FloatSubject x ()

Returns
FloatSubject

public FloatSubject xPrecision ()

Returns
FloatSubject

public FloatSubject y (int pointerIndex)

Parameters
pointerIndex int
Returns
FloatSubject

public FloatSubject y ()

Returns
FloatSubject

public FloatSubject yPrecision ()

Returns
FloatSubject