|
@@ -6,15 +6,18 @@ import android.os.Bundle;
|
6
|
6
|
import com.facebook.react.ReactInstanceManager;
|
7
|
7
|
import com.facebook.react.ReactRootView;
|
8
|
8
|
|
9
|
|
-public class ContentView extends ReactRootView {
|
|
9
|
+public class ContentView extends ReactRootView implements ScrollDirectionListener.OnChanged {
|
|
10
|
+
|
|
11
|
+ private final ScrollViewAttacher scrollViewAttacher;
|
10
|
12
|
|
11
|
13
|
public ContentView(Context context, ReactInstanceManager reactInstanceManager, String moduleName, Bundle passProps) {
|
12
|
14
|
super(context);
|
13
|
15
|
startReactApplication(reactInstanceManager, moduleName, passProps);
|
|
16
|
+ scrollViewAttacher = new ScrollViewAttacher(this, this);
|
14
|
17
|
}
|
15
|
18
|
|
16
|
19
|
@Override
|
17
|
|
- protected void onDetachedFromWindow() {
|
18
|
|
- super.onDetachedFromWindow();
|
|
20
|
+ public void onScrollChanged(ScrollDirectionListener.Direction direction) {
|
|
21
|
+
|
19
|
22
|
}
|
20
|
23
|
}
|