List of usage examples for com.facebook.react.views.scroll ReactScrollViewHelper emitScrollBeginDragEvent
public static void emitScrollBeginDragEvent(ViewGroup scrollView)
From source file:com.rnnestedscrollview.ReactNestedScrollView.java
License:MIT License
@Override public boolean onInterceptTouchEvent(MotionEvent ev) { if (!mScrollEnabled) { return false; }// ww w . j a v a 2 s.c o m try { if (super.onInterceptTouchEvent(ev)) { NativeGestureUtil.notifyNativeGestureStarted(this, ev); ReactScrollViewHelper.emitScrollBeginDragEvent(this); mDragging = true; enableFpsListener(); return true; } } catch (IllegalArgumentException e) { // Log and ignore the error. This seems to be a bug in the android SDK and // this is the commonly accepted workaround. // https://tinyurl.com/mw6qkod (Stack Overflow) Log.w(ReactConstants.TAG, "Error intercepting touch event.", e); } return false; }
From source file:com.zulipmobile.AnchorScrollView.java
License:Open Source License
@Override public boolean onInterceptTouchEvent(MotionEvent ev) { if (!mScrollEnabled) { return false; }/*from w w w .j a v a2s.c o m*/ if (super.onInterceptTouchEvent(ev)) { NativeGestureUtil.notifyNativeGestureStarted(this, ev); ReactScrollViewHelper.emitScrollBeginDragEvent(this); mDragging = true; enableFpsListener(); return true; } return false; }