lightbulb_outline Please take our October 2018 developer survey. Start survey

MotionEventSubject

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


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()

Inherited methods

From class com.google.common.truth.Subject
From class java.lang.Object

Public methods

assertThat

MotionEventSubject assertThat (MotionEvent event)

Parameters
event MotionEvent

Returns
MotionEventSubject

hasAction

void hasAction (int action)

Parameters
action int

hasActionButton

void hasActionButton (int actionButton)

Check the value of getActionButton()

Parameters
actionButton int

Throws
IllegalStateException if called on below Android API 23

hasButtonState

void hasButtonState (int buttonState)

Parameters
buttonState int

hasDeviceId

void hasDeviceId (int deviceId)

Parameters
deviceId int

hasDownTime

void hasDownTime (long downTime)

Parameters
downTime long

hasEdgeFlags

void hasEdgeFlags (int edgeFlags)

Parameters
edgeFlags int

hasEventTime

void hasEventTime (long eventTime)

Parameters
eventTime long

hasFlags

void hasFlags (int flags)

Parameters
flags int

hasHistorySize

void hasHistorySize (int historySize)

Parameters
historySize int

hasMetaState

void hasMetaState (int metaState)

Parameters
metaState int

hasPointerCount

void hasPointerCount (int pointerCount)

Parameters
pointerCount int

historicalEventTime

LongSubject historicalEventTime (int pos)

Parameters
pos int

Returns
LongSubject

historicalOrientation

FloatSubject historicalOrientation (int pos)

Parameters
pos int

Returns
FloatSubject

historicalPointerCoords

PointerCoordsSubject historicalPointerCoords (int pointerIndex, 
                int pos)

Parameters
pointerIndex int

pos int

Returns
PointerCoordsSubject

historicalPressure

FloatSubject historicalPressure (int pos)

Parameters
pos int

Returns
FloatSubject

historicalSize

FloatSubject historicalSize (int pos)

Parameters
pos int

Returns
FloatSubject

historicalToolMajor

FloatSubject historicalToolMajor (int pos)

Parameters
pos int

Returns
FloatSubject

historicalToolMinor

FloatSubject historicalToolMinor (int pos)

Parameters
pos int

Returns
FloatSubject

historicalTouchMajor

FloatSubject historicalTouchMajor (int pos)

Parameters
pos int

Returns
FloatSubject

historicalTouchMinor

FloatSubject historicalTouchMinor (int pos)

Parameters
pos int

Returns
FloatSubject

historicalX

FloatSubject historicalX (int pos)

Parameters
pos int

Returns
FloatSubject

historicalY

FloatSubject historicalY (int pos)

Parameters
pos int

Returns
FloatSubject

motionEvents

Factory<MotionEventSubjectMotionEvent> motionEvents ()

Returns
Factory<MotionEventSubjectMotionEvent>

orientation

FloatSubject orientation ()

Returns
FloatSubject

orientation

FloatSubject orientation (int pointerIndex)

Parameters
pointerIndex int

Returns
FloatSubject

pointerCoords

PointerCoordsSubject pointerCoords (int pointerIndex)

Parameters
pointerIndex int

Returns
PointerCoordsSubject

pointerId

IntegerSubject pointerId (int pointerIndex)

Parameters
pointerIndex int

Returns
IntegerSubject

pointerProperties

PointerPropertiesSubject pointerProperties (int pointerIndex)

Parameters
pointerIndex int

Returns
PointerPropertiesSubject

pressure

FloatSubject pressure (int pointerIndex)

Parameters
pointerIndex int

Returns
FloatSubject

pressure

FloatSubject pressure ()

Returns
FloatSubject

rawX

FloatSubject rawX ()

Returns
FloatSubject

rawY

FloatSubject rawY ()

Returns
FloatSubject

size

FloatSubject size (int pointerIndex)

Parameters
pointerIndex int

Returns
FloatSubject

size

FloatSubject size ()

Returns
FloatSubject

toolMajor

FloatSubject toolMajor ()

Returns
FloatSubject

toolMajor

FloatSubject toolMajor (int pointerIndex)

Parameters
pointerIndex int

Returns
FloatSubject

toolMinor

FloatSubject toolMinor (int pointerIndex)

Parameters
pointerIndex int

Returns
FloatSubject

toolMinor

FloatSubject toolMinor ()

Returns
FloatSubject

touchMajor

FloatSubject touchMajor ()

Returns
FloatSubject

touchMajor

FloatSubject touchMajor (int pointerIndex)

Parameters
pointerIndex int

Returns
FloatSubject

touchMinor

FloatSubject touchMinor ()

Returns
FloatSubject

touchMinor

FloatSubject touchMinor (int pointerIndex)

Parameters
pointerIndex int

Returns
FloatSubject

x

FloatSubject x (int pointerIndex)

Parameters
pointerIndex int

Returns
FloatSubject

x

FloatSubject x ()

Returns
FloatSubject

xPrecision

FloatSubject xPrecision ()

Returns
FloatSubject

y

FloatSubject y (int pointerIndex)

Parameters
pointerIndex int

Returns
FloatSubject

y

FloatSubject y ()

Returns
FloatSubject

yPrecision

FloatSubject yPrecision ()

Returns
FloatSubject