@Override public boolean onInterceptTouchEvent(MotionEvent ev) { if (super.onInterceptTouchEvent(ev)) { NativeGestureUtil.notifyNativeGestureStarted(this, ev); mDragging = true; getReactContext().getNativeModule(UIManagerModule.class).getEventDispatcher() .dispatchEvent(ScrollEvent.obtain( getId(), ScrollEventType.BEGIN_DRAG, 0, /* offsetX = 0, horizontal scrolling only */ computeVerticalScrollOffset(), 0, // xVelocity 0, // yVelocity getWidth(), computeVerticalScrollRange(), getWidth(), getHeight())); return true; } return false; }
@Override public boolean onInterceptTouchEvent(MotionEvent ev) { if (!mScrollEnabled) { return false; } if (super.onInterceptTouchEvent(ev)) { NativeGestureUtil.notifyNativeGestureStarted(this, ev); ReactScrollViewHelper.emitScrollBeginDragEvent(this); mDragging = true; enableFpsListener(); return true; } return false; }
private void onActionMove(MotionEvent motionEvent) { NativeGestureUtil.notifyNativeGestureStarted(this, motionEvent); if (isScaleInProgress) return; isScrollInProgress = true; float deltaX = motionEvent.getX() - startTouchX; float deltaY = motionEvent.getY() - startTouchY; scrollX = startScrollX + deltaX; scrollY = startScrollY + deltaY; if (bounces) { translateChildren(false); } else { clampAndTranslateChildren(false); } ReactScrollViewHelper.emitScrollEvent(this, 0, 0); }
@Override public boolean onInterceptTouchEvent(MotionEvent ev) { if (!mScrollEnabled) { return false; } try { if (super.onInterceptTouchEvent(ev)) { NativeGestureUtil.notifyNativeGestureStarted(this, ev); return true; } return false; } catch (Exception e) { return false; } }
@Override public boolean onInterceptTouchEvent(MotionEvent ev) { if (!mScrollEnabled) { return false; } if (super.onInterceptTouchEvent(ev)) { NativeGestureUtil.notifyNativeGestureStarted(this, ev); return true; } return false; }
@Override public boolean onInterceptTouchEvent(MotionEvent ev) { if (super.onInterceptTouchEvent(ev)) { NativeGestureUtil.notifyNativeGestureStarted(this, ev); return true; } return false; }
@Override public boolean onInterceptTouchEvent(MotionEvent ev) { if (shouldInterceptTouchEvent(ev) && super.onInterceptTouchEvent(ev)) { NativeGestureUtil.notifyNativeGestureStarted(this, ev); return true; } return false; }
@Override public boolean onInterceptTouchEvent(MotionEvent ev) { if (!mScrollEnabled) { return false; } if (super.onInterceptTouchEvent(ev)) { NativeGestureUtil.notifyNativeGestureStarted(this, ev); ReactScrollViewHelper.emitScrollBeginDragEvent(this); mDragging = true; return true; } return false; }
@Override public boolean onInterceptTouchEvent(MotionEvent ev) { if (mScrollEnabled && super.onInterceptTouchEvent(ev)) { NativeGestureUtil.notifyNativeGestureStarted(this, ev); return true; } return false; }