@Override
public boolean onTouchEvent(MotionEvent ev) {
int action = ev.getAction() & MotionEvent.ACTION_MASK;
if (action == MotionEvent.ACTION_UP && mDragging) {
mDragging = false;
mVelocityHelper.calculateVelocity(ev);
getReactContext().getNativeModule(UIManagerModule.class).getEventDispatcher()
.dispatchEvent(ScrollEvent.obtain(
getId(),
ScrollEventType.END_DRAG,
0, /* offsetX = 0, horizontal scrolling only */
computeVerticalScrollOffset(),
mVelocityHelper.getXVelocity(),
mVelocityHelper.getYVelocity(),
getWidth(),
computeVerticalScrollRange(),
getWidth(),
getHeight()));
}
return super.onTouchEvent(ev);
}
RecyclerViewBackedScrollView.java 文件源码
java
阅读 37
收藏 0
点赞 0
评论 0
项目:react-native-recyclerview-list
作者:
评论列表
文章目录