File tree Expand file tree Collapse file tree
Example/android/app/src/main/java/tonlabs/uikit Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222import com .mixiaoxiao .overscroll .PathScroller ;
2323
2424import java .lang .reflect .Field ;
25+ import java .lang .reflect .InvocationTargetException ;
26+ import java .lang .reflect .Method ;
2527
2628/**
2729 * https://github.com/Mixiaoxiao/OverScroll-Everywhere
@@ -78,6 +80,20 @@ public boolean onTouchEvent(MotionEvent event) {
7880 // TODO: it's fired twice for some reason
7981 ReactScrollViewHelper .emitScrollEndDragEvent (this , 0 , 0 );
8082 mDragging = false ;
83+
84+ // TODO: create a wrapper with method invoker
85+ try {
86+ Method handlePostTouchScrolling = ReactScrollView .class .getDeclaredMethod ("handlePostTouchScrolling" );
87+ handlePostTouchScrolling .setAccessible (true );
88+ // TODO: velocity
89+ handlePostTouchScrolling .invoke (this , 0 , 0 );
90+ } catch (IllegalAccessException e ) {
91+ e .printStackTrace ();
92+ } catch (InvocationTargetException e ) {
93+ e .printStackTrace ();
94+ } catch (NoSuchMethodException e ) {
95+ e .printStackTrace ();
96+ }
8197// return true;
8298 }
8399 int offset = this .superComputeVerticalScrollOffset ();
You can’t perform that action at this time.
0 commit comments