Java 类com.facebook.react.uimanager.events.NativeGestureUtil 实例源码

项目:react-native-recyclerview-list    文件:RecyclerViewBackedScrollView.java   
@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;
}
项目:RNLearn_Project1    文件:ReactScrollView.java   
@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;
}
项目:RNLearn_Project1    文件:ReactHorizontalScrollView.java   
@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;
}
项目:RNLearn_Project1    文件:ReactScrollView.java   
@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;
}
项目:RNLearn_Project1    文件:ReactHorizontalScrollView.java   
@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;
}
项目:react-native-directed-scrollview    文件:DirectedScrollView.java   
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);
}
项目:Ironman    文件:ReactScrollView.java   
@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;
}
项目:Ironman    文件:ReactHorizontalScrollView.java   
@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;
}
项目:react-native-image-zoom    文件:ReactViewPager.java   
@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;
    }
}
项目:react-native-tabbed-view-pager-android    文件:ReactViewPager.java   
@Override public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (!mScrollEnabled) {
    return false;
  }

  if (super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:RNLearn_Project1    文件:ReactDrawerLayout.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:RNLearn_Project1    文件:ReactSwipeRefreshLayout.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (shouldInterceptTouchEvent(ev) && super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:RNLearn_Project1    文件:ReactViewPager.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (!mScrollEnabled) {
    return false;
  }

  if (super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:RNLearn_Project1    文件:ReactDrawerLayout.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:RNLearn_Project1    文件:ReactSwipeRefreshLayout.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (shouldInterceptTouchEvent(ev) && super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:RNLearn_Project1    文件:ReactViewPager.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (!mScrollEnabled) {
    return false;
  }

  if (super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:ReactNativeSignatureExample    文件:ReactDrawerLayout.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:ReactNativeSignatureExample    文件:RecyclerViewBackedScrollView.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:ReactNativeSignatureExample    文件:ReactSwipeRefreshLayout.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:ReactNativeSignatureExample    文件:ReactViewPager.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:ReactNativeSignatureExample    文件:ReactScrollView.java   
@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;
}
项目:ReactNativeSignatureExample    文件:ReactHorizontalScrollView.java   
@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;
}
项目:react-native-ibeacon-android    文件:ReactDrawerLayout.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:react-native-ibeacon-android    文件:RecyclerViewBackedScrollView.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:react-native-ibeacon-android    文件:ReactSwipeRefreshLayout.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:react-native-ibeacon-android    文件:ReactViewPager.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:react-native-ibeacon-android    文件:ReactScrollView.java   
@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;
}
项目:react-native-ibeacon-android    文件:ReactHorizontalScrollView.java   
@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;
}
项目:react-native-box-loaders    文件:ReactDrawerLayout.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:react-native-box-loaders    文件:RecyclerViewBackedScrollView.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:react-native-box-loaders    文件:ReactSwipeRefreshLayout.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:react-native-box-loaders    文件:ReactViewPager.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (mScrollEnabled && super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:react-native-box-loaders    文件:ReactScrollView.java   
@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;
}
项目:react-native-box-loaders    文件:ReactHorizontalScrollView.java   
@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;
}
项目:Ironman    文件:ReactDrawerLayout.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:Ironman    文件:RecyclerViewBackedScrollView.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:Ironman    文件:ReactSwipeRefreshLayout.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (shouldInterceptTouchEvent(ev) && super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}
项目:Ironman    文件:ReactViewPager.java   
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
  if (!mScrollEnabled) {
    return false;
  }

  if (super.onInterceptTouchEvent(ev)) {
    NativeGestureUtil.notifyNativeGestureStarted(this, ev);
    return true;
  }
  return false;
}