Example usage for com.facebook.react.views.scroll ReactScrollViewHelper emitScrollEvent

List of usage examples for com.facebook.react.views.scroll ReactScrollViewHelper emitScrollEvent

Introduction

In this page you can find the example usage for com.facebook.react.views.scroll ReactScrollViewHelper emitScrollEvent.

Prototype

public static void emitScrollEvent(ViewGroup scrollView, float xVelocity, float yVelocity) 

Source Link

Document

Shared by ReactScrollView and ReactHorizontalScrollView .

Usage

From source file:com.rnnestedscrollview.ReactNestedScrollView.java

License:MIT License

@Override
protected void onScrollChanged(int x, int y, int oldX, int oldY) {
    super.onScrollChanged(x, y, oldX, oldY);

    mActivelyScrolling = true;/*w  ww  .jav a  2s .c o  m*/

    if (mOnScrollDispatchHelper.onScrollChanged(x, y)) {
        if (mRemoveClippedSubviews) {
            updateClippingRect();
        }

        ReactScrollViewHelper.emitScrollEvent(this, mOnScrollDispatchHelper.getXFlingVelocity(),
                mOnScrollDispatchHelper.getYFlingVelocity());
    }
}