Class ShadowMotionEvent

java.lang.Object
org.robolectric.shadows.ShadowInputEvent
org.robolectric.shadows.ShadowMotionEvent

@Implements(android.view.MotionEvent.class)
public class ShadowMotionEvent
extends ShadowInputEvent
Shadow of MotionEvent.

The Android framework stores motion events in a pool of native objects. All motion event data is stored natively, and accessed via a series of static native methods following the pattern nativeGetXXXX(mNativePtr, ...)

This shadow mirrors this design, but has java equivalents of each native object. Most of the contents of this class were transliterated from oreo-mr1 (SDK 27) frameworks/base/core/jni/android_view_MotionEvent.cpp

See Also:
core/jni/android_view_MotionEvent.cpp

Tests should not reference this class directly. MotionEvents should be created via one of the MotionEvent.obtain methods or via MotionEventBuilder.