HomeSort by relevance Sort by last modified time
    Searched refs:motionEvent (Results 1 - 23 of 23) sorted by null

  /cts/tests/accessibilityservice/src/android/accessibilityservice/cts/utils/
EventCapturingTouchListener.java 22 import android.view.MotionEvent;
30 public final BlockingQueue<MotionEvent> events = new LinkedBlockingQueue<>();
33 public boolean onTouch(View view, MotionEvent motionEvent) {
34 assertTrue(events.offer(MotionEvent.obtain(motionEvent)));
  /external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
ShadowScaleGestureDetectorTest.java 8 import android.view.MotionEvent;
20 private MotionEvent motionEvent;
25 motionEvent = MotionEvent.obtain(-1, -1, MotionEvent.ACTION_UP, 100, 30, -1);
30 detector.onTouchEvent(motionEvent);
31 assertSame(motionEvent, shadowOf(detector).getOnTouchEventMotionEvent());
60 detector.onTouchEvent(motionEvent);
63 assertSame(motionEvent, shadowOf(detector).getOnTouchEventMotionEvent())
    [all...]
ShadowGestureDetectorTest.java 12 import android.view.MotionEvent;
23 private MotionEvent motionEvent;
29 motionEvent = newBuilder().setAction(MotionEvent.ACTION_UP).setPointer(100, 30).build();
35 detector.onTouchEvent(motionEvent);
36 assertSame(motionEvent, shadowOf(detector).getOnTouchEventMotionEvent());
41 detector.onTouchEvent(motionEvent);
42 assertSame(motionEvent, shadowOf(detector).getOnTouchEventMotionEvent());
59 newDetector.onTouchEvent(motionEvent);
    [all...]
ShadowViewTest.java 31 import android.view.MotionEvent;
441 MotionEvent event = MotionEvent.obtain(0L, 0L, MotionEvent.ACTION_DOWN, 12f, 34f, 0);
453 public boolean onTouch(View view, MotionEvent motionEvent) {
457 MotionEvent event = MotionEvent.obtain(0L, 0L, MotionEvent.ACTION_DOWN, 12f, 34f, 0);
753 MotionEvent event
    [all...]
  /external/skia/platform_tools/android/apps/skar_java/src/main/java/com/google/skar/examples/helloskar/helpers/
GestureHelper.java 21 import android.view.MotionEvent;
34 private final BlockingQueue<MotionEvent> queuedSingleTaps = new ArrayBlockingQueue<>(16);
39 // Struct holding a MotionEvent obtained from onScroll() callbacks, and a boolean evaluating to
42 public MotionEvent event;
45 public ScrollEvent(MotionEvent e, boolean isStartOfScroll) {
62 public boolean onSingleTapUp(MotionEvent e) {
69 public boolean onScroll (MotionEvent e1, MotionEvent e2,
86 public boolean onDown(MotionEvent e) {
95 * @return if a tap was queued, a MotionEvent for the tap. Otherwise null if no taps are queued
    [all...]
  /external/skqp/platform_tools/android/apps/skar_java/src/main/java/com/google/skar/examples/helloskar/helpers/
GestureHelper.java 21 import android.view.MotionEvent;
34 private final BlockingQueue<MotionEvent> queuedSingleTaps = new ArrayBlockingQueue<>(16);
39 // Struct holding a MotionEvent obtained from onScroll() callbacks, and a boolean evaluating to
42 public MotionEvent event;
45 public ScrollEvent(MotionEvent e, boolean isStartOfScroll) {
62 public boolean onSingleTapUp(MotionEvent e) {
69 public boolean onScroll (MotionEvent e1, MotionEvent e2,
86 public boolean onDown(MotionEvent e) {
95 * @return if a tap was queued, a MotionEvent for the tap. Otherwise null if no taps are queued
    [all...]
  /developers/build/prebuilts/gradle/BasicGestureDetect/Application/src/main/java/com/example/android/basicgesturedetect/
BasicGestureDetectFragment.java 24 import android.view.MotionEvent;
59 public boolean onTouch(View view, MotionEvent motionEvent) {
60 gd.onTouchEvent(motionEvent);
  /developers/build/prebuilts/gradle/ElevationBasic/Application/src/main/java/com/example/android/elevationbasic/
ElevationBasicFragment.java 22 import android.view.MotionEvent;
54 public boolean onTouch(View view, MotionEvent motionEvent) {
55 int action = motionEvent.getActionMasked();
58 case MotionEvent.ACTION_DOWN:
62 case MotionEvent.ACTION_UP:
  /developers/samples/android/input/gestures/BasicGestureDetect/Application/src/main/java/com/example/android/basicgesturedetect/
BasicGestureDetectFragment.java 24 import android.view.MotionEvent;
59 public boolean onTouch(View view, MotionEvent motionEvent) {
60 gd.onTouchEvent(motionEvent);
  /developers/samples/android/ui/views/Elevation/ElevationBasic/Application/src/main/java/com/example/android/elevationbasic/
ElevationBasicFragment.java 22 import android.view.MotionEvent;
54 public boolean onTouch(View view, MotionEvent motionEvent) {
55 int action = motionEvent.getActionMasked();
58 case MotionEvent.ACTION_DOWN:
62 case MotionEvent.ACTION_UP:
  /development/samples/browseable/BasicGestureDetect/src/com.example.android.basicgesturedetect/
BasicGestureDetectFragment.java 24 import android.view.MotionEvent;
59 public boolean onTouch(View view, MotionEvent motionEvent) {
60 gd.onTouchEvent(motionEvent);
  /development/samples/browseable/ElevationBasic/src/com.example.android.elevationbasic/
ElevationBasicFragment.java 22 import android.view.MotionEvent;
54 public boolean onTouch(View view, MotionEvent motionEvent) {
55 int action = motionEvent.getActionMasked();
58 case MotionEvent.ACTION_DOWN:
62 case MotionEvent.ACTION_UP:
  /development/samples/devbytes/ui/ImmersiveMode/src/main/java/com/example/android/immersive/
ImmersiveActivity.java 24 import android.view.MotionEvent;
55 public boolean onSingleTapUp(MotionEvent e) {
68 public boolean onTouch(View view, MotionEvent motionEvent) {
69 return clickDetector.onTouchEvent(motionEvent);
  /external/subsampling-scale-image-view/sample/src/main/java/com/davemorrissey/labs/subscaleview/test/eventhandlingadvanced/
AdvancedEventHandlingActivity.java 6 import android.view.MotionEvent;
39 public boolean onSingleTapConfirmed(MotionEvent e) {
49 public void onLongPress(MotionEvent e) {
58 public boolean onDoubleTap(MotionEvent e) {
72 public boolean onTouch(View view, MotionEvent motionEvent) {
73 return gestureDetector.onTouchEvent(motionEvent);
  /cts/tests/tests/view/src/android/view/cts/
MotionEventTest.java 35 import android.view.MotionEvent;
36 import android.view.MotionEvent.PointerCoords;
37 import android.view.MotionEvent.PointerProperties;
53 * Test {@link MotionEvent}.
58 private MotionEvent mMotionEvent1;
59 private MotionEvent mMotionEvent2;
60 private MotionEvent mMotionEventDynamic;
71 private static final int EDGE_FLAGS = MotionEvent.EDGE_TOP;
79 mMotionEvent1 = MotionEvent.obtain(mDownTime, mEventTime,
80 MotionEvent.ACTION_MOVE, X_3F, Y_4F, META_STATE)
    [all...]
MotionEventUtils.java 21 import android.view.MotionEvent;
22 import android.view.MotionEvent.PointerCoords;
23 import android.view.MotionEvent.PointerProperties;
57 public void verifyMatches(MotionEvent that, int pointerIndex) {
69 public void verifyMatchesPointerProperties(MotionEvent motionEvent, int pointerIndex) {
71 motionEvent.getPointerProperties(pointerIndex, that);
129 public void verifyMatches(MotionEvent that) {
132 that.getAxisValue(MotionEvent.AXIS_X), this.x, DELTA);
136 that.getAxisValue(MotionEvent.AXIS_Y), this.y, DELTA)
    [all...]
  /development/samples/devbytes/animation/CardFlip/src/com/example/android/cardflip/
CardFlip.java 26 import android.view.MotionEvent;
139 public boolean onSingleTapUp(MotionEvent motionEvent) {
140 int stack = getStack(motionEvent);
146 public boolean onFling(MotionEvent motionEvent, MotionEvent motionEvent2, float v,
148 int stack = getStack(motionEvent);
158 /** Returns the appropriate stack corresponding to the MotionEvent. */
159 public int getStack(MotionEvent ev)
    [all...]
  /external/androidplot/AndroidPlot-Core/src/main/java/com/androidplot/xy/
XYPlotZoomPan.java 6 import android.view.MotionEvent;
228 public boolean onTouch(final View view, final MotionEvent event) {
229 switch (event.getAction() & MotionEvent.ACTION_MASK)
231 case MotionEvent.ACTION_DOWN: // start gesture
235 case MotionEvent.ACTION_POINTER_DOWN: // second finger
244 case MotionEvent.ACTION_POINTER_UP: // end zoom
247 case MotionEvent.ACTION_MOVE:
258 private float getXDistance(final MotionEvent event) {
262 private void pan(final MotionEvent motionEvent) {
    [all...]
  /developers/build/prebuilts/androidtv/visual-game-controller/src/com/example/android/visualgamecontroller/
FullscreenActivity.java 30 import android.view.MotionEvent;
105 AXIS_X(MotionEvent.AXIS_X),
106 AXIS_Y(MotionEvent.AXIS_Y),
107 AXIS_Z(MotionEvent.AXIS_Z),
108 AXIS_RZ(MotionEvent.AXIS_RZ),
109 AXIS_HAT_X(MotionEvent.AXIS_HAT_X),
110 AXIS_HAT_Y(MotionEvent.AXIS_HAT_Y),
111 AXIS_LTRIGGER(MotionEvent.AXIS_LTRIGGER),
112 AXIS_RTRIGGER(MotionEvent.AXIS_RTRIGGER),
113 AXIS_BRAKE(MotionEvent.AXIS_BRAKE)
    [all...]
  /external/androidplot/Examples/DemoApp/src/com/androidplot/demos/
BarPlotExampleActivity.java 32 import android.view.MotionEvent;
155 public boolean onTouch(View view, MotionEvent motionEvent) {
156 if(motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
157 onPlotClicked(new PointF(motionEvent.getX(), motionEvent.getY()));
  /cts/tests/app/src/android/app/cts/
InstrumentationTest.java 44 import android.view.MotionEvent;
213 MotionEvent orig = MotionEvent.obtain(now, now, MotionEvent.ACTION_DOWN,
218 MotionEvent motionEvent = mActivity.getMotionEvent();
219 assertEquals(orig.getMetaState(), motionEvent.getMetaState());
220 assertEquals(orig.getEventTime(), motionEvent.getEventTime());
221 assertEquals(orig.getDownTime(), motionEvent.getDownTime());
365 MotionEvent orig = MotionEvent.obtain(now, now, MotionEvent.ACTION_DOWN
    [all...]
  /external/subsampling-scale-image-view/sample/src/main/java/com/davemorrissey/labs/subscaleview/test/extension/views/
FreehandView.java 9 import android.view.MotionEvent;
47 public boolean onTouch(View view, MotionEvent motionEvent) {
52 public boolean onTouchEvent(@NonNull MotionEvent event) {
59 case MotionEvent.ACTION_DOWN:
68 case MotionEvent.ACTION_MOVE:
93 case MotionEvent.ACTION_UP:
94 case MotionEvent.ACTION_POINTER_UP:
  /cts/tests/accessibilityservice/src/android/accessibilityservice/cts/
AccessibilityGestureDispatchTest.java 53 import android.view.MotionEvent;
78 private static final Matcher<MotionEvent> IS_ACTION_DOWN =
79 new MotionEventActionMatcher(MotionEvent.ACTION_DOWN);
80 private static final Matcher<MotionEvent> IS_ACTION_POINTER_DOWN =
81 new MotionEventActionMatcher(MotionEvent.ACTION_POINTER_DOWN);
82 private static final Matcher<MotionEvent> IS_ACTION_UP =
83 new MotionEventActionMatcher(MotionEvent.ACTION_UP);
84 private static final Matcher<MotionEvent> IS_ACTION_POINTER_UP =
85 new MotionEventActionMatcher(MotionEvent.ACTION_POINTER_UP);
86 private static final Matcher<MotionEvent> IS_ACTION_CANCEL
    [all...]

Completed in 686 milliseconds