本文整理汇总了Java中com.facebook.react.uimanager.events.NativeGestureUtil.notifyNativeGestureStarted方法的典型用法代码示例。如果您正苦于以下问题:Java NativeGestureUtil.notifyNativeGestureStarted方法的具体用法?Java NativeGestureUtil.notifyNativeGestureStarted怎么用?Java NativeGestureUtil.notifyNativeGestureStarted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.facebook.react.uimanager.events.NativeGestureUtil
的用法示例。
在下文中一共展示了NativeGestureUtil.notifyNativeGestureStarted方法的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;
}
示例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;
}
示例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);
}
示例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;
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}