本文整理汇总了Java中com.facebook.react.uimanager.events.NativeGestureUtil类的典型用法代码示例。如果您正苦于以下问题:Java NativeGestureUtil类的具体用法?Java NativeGestureUtil怎么用?Java NativeGestureUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NativeGestureUtil类属于com.facebook.react.uimanager.events包,在下文中一共展示了NativeGestureUtil类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onInterceptTouchEvent
import com.facebook.react.uimanager.events.NativeGestureUtil; //导入依赖的package包/类
@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;
}
开发者ID:godness84,项目名称:react-native-recyclerview-list,代码行数:23,代码来源:RecyclerViewBackedScrollView.java
示例2: onInterceptTouchEvent
import com.facebook.react.uimanager.events.NativeGestureUtil; //导入依赖的package包/类
@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;
}
开发者ID:qq565999484,项目名称:RNLearn_Project1,代码行数:17,代码来源:ReactScrollView.java
示例3: onActionMove
import com.facebook.react.uimanager.events.NativeGestureUtil; //导入依赖的package包/类
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);
}
开发者ID:chrisfisher,项目名称:react-native-directed-scrollview,代码行数:22,代码来源:DirectedScrollView.java
示例4: onInterceptTouchEvent
import com.facebook.react.uimanager.events.NativeGestureUtil; //导入依赖的package包/类
@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;
}
}
开发者ID:Anthonyzou,项目名称:react-native-image-zoom,代码行数:17,代码来源:ReactViewPager.java
示例5: onInterceptTouchEvent
import com.facebook.react.uimanager.events.NativeGestureUtil; //导入依赖的package包/类
@Override public boolean onInterceptTouchEvent(MotionEvent ev) {
if (!mScrollEnabled) {
return false;
}
if (super.onInterceptTouchEvent(ev)) {
NativeGestureUtil.notifyNativeGestureStarted(this, ev);
return true;
}
return false;
}
开发者ID:madhu314,项目名称:react-native-tabbed-view-pager-android,代码行数:12,代码来源:ReactViewPager.java
示例6: onInterceptTouchEvent
import com.facebook.react.uimanager.events.NativeGestureUtil; //导入依赖的package包/类
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
if (super.onInterceptTouchEvent(ev)) {
NativeGestureUtil.notifyNativeGestureStarted(this, ev);
return true;
}
return false;
}
开发者ID:qq565999484,项目名称:RNLearn_Project1,代码行数:9,代码来源:ReactDrawerLayout.java
示例7: onInterceptTouchEvent
import com.facebook.react.uimanager.events.NativeGestureUtil; //导入依赖的package包/类
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
if (shouldInterceptTouchEvent(ev) && super.onInterceptTouchEvent(ev)) {
NativeGestureUtil.notifyNativeGestureStarted(this, ev);
return true;
}
return false;
}
开发者ID:qq565999484,项目名称:RNLearn_Project1,代码行数:9,代码来源:ReactSwipeRefreshLayout.java
示例8: onInterceptTouchEvent
import com.facebook.react.uimanager.events.NativeGestureUtil; //导入依赖的package包/类
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
if (!mScrollEnabled) {
return false;
}
if (super.onInterceptTouchEvent(ev)) {
NativeGestureUtil.notifyNativeGestureStarted(this, ev);
return true;
}
return false;
}
开发者ID:qq565999484,项目名称:RNLearn_Project1,代码行数:13,代码来源:ReactViewPager.java
示例9: onInterceptTouchEvent
import com.facebook.react.uimanager.events.NativeGestureUtil; //导入依赖的package包/类
@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;
}
开发者ID:john1jan,项目名称:ReactNativeSignatureExample,代码行数:16,代码来源:ReactScrollView.java
示例10: onInterceptTouchEvent
import com.facebook.react.uimanager.events.NativeGestureUtil; //导入依赖的package包/类
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
if (mScrollEnabled && super.onInterceptTouchEvent(ev)) {
NativeGestureUtil.notifyNativeGestureStarted(this, ev);
return true;
}
return false;
}
开发者ID:ManrajGrover,项目名称:react-native-box-loaders,代码行数:9,代码来源:ReactViewPager.java
注:本文中的com.facebook.react.uimanager.events.NativeGestureUtil类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论