List of usage examples for com.facebook.react.uimanager.events NativeGestureUtil notifyNativeGestureStarted
public static void notifyNativeGestureStarted(View view, MotionEvent event)
From source file:com.bottomsheetbehavior.ReactNestedScrollView.java
License:Open Source License
@Override public boolean onInterceptTouchEvent(MotionEvent ev) { if (!mScrollEnabled) { return false; }/*from w ww .j a va2 s .com*/ if (super.onInterceptTouchEvent(ev)) { NativeGestureUtil.notifyNativeGestureStarted(this, ev); ReactNestedScrollViewHelper.emitScrollBeginDragEvent(this); mDragging = true; enableFpsListener(); return true; } return false; }
From source file:com.qiji.view.viewpager.ReactViewPager.java
License:Open Source License
@Override public boolean onInterceptTouchEvent(MotionEvent ev) { if (super.onInterceptTouchEvent(ev)) { NativeGestureUtil.notifyNativeGestureStarted(this, ev); return true; }/*from w w w . ja v a2 s . c o m*/ return false; }
From source file:com.reactnative.swiper.viewpager.ReactViewPager.java
License:Open Source License
@Override public boolean onInterceptTouchEvent(MotionEvent ev) { if (!mScrollEnabled) { return false; }/* www .java 2 s .c o m*/ try { if (super.onInterceptTouchEvent(ev)) { NativeGestureUtil.notifyNativeGestureStarted(this, ev); return true; } return false; } catch (Exception e) { return false; } }
From source file:com.rnnestedscrollview.ReactNestedScrollView.java
License:MIT License
@Override public boolean onInterceptTouchEvent(MotionEvent ev) { if (!mScrollEnabled) { return false; }/*from w ww . jav a2s . c om*/ 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 av a 2s .com*/ if (super.onInterceptTouchEvent(ev)) { NativeGestureUtil.notifyNativeGestureStarted(this, ev); ReactScrollViewHelper.emitScrollBeginDragEvent(this); mDragging = true; enableFpsListener(); return true; } return false; }