|
@@ -5,10 +5,12 @@ import android.app.Activity;
|
5
|
5
|
import android.content.Context;
|
6
|
6
|
import android.graphics.Color;
|
7
|
7
|
import android.os.Build;
|
|
8
|
+import android.util.Log;
|
8
|
9
|
import android.view.View;
|
9
|
10
|
import android.view.Window;
|
10
|
11
|
import android.widget.LinearLayout;
|
11
|
12
|
|
|
13
|
+import com.reactnativenavigation.animation.HideOnScrollAnimator;
|
12
|
14
|
import com.reactnativenavigation.params.ScreenParams;
|
13
|
15
|
import com.reactnativenavigation.params.ScreenStyleParams;
|
14
|
16
|
import com.reactnativenavigation.utils.SdkSupports;
|
|
@@ -24,6 +26,7 @@ public class ScreenImpl extends LinearLayout implements Screen, ScrollDirectionL
|
24
|
26
|
private final ScreenParams screenParams;
|
25
|
27
|
private ContentView contentView;
|
26
|
28
|
private TopBar topBar;
|
|
29
|
+ private HideOnScrollAnimator scrollAnimator;
|
27
|
30
|
|
28
|
31
|
public ScreenImpl(Context context, ScreenParams screenParams) {
|
29
|
32
|
super(context);
|
|
@@ -102,7 +105,11 @@ public class ScreenImpl extends LinearLayout implements Screen, ScrollDirectionL
|
102
|
105
|
|
103
|
106
|
@Override
|
104
|
107
|
public void onScrollChanged(ScrollDirectionListener.Direction direction) {
|
105
|
|
- // TODO handle if needed
|
|
108
|
+ Log.d("TAG", "onScrollChanged: ");
|
|
109
|
+ if (scrollAnimator == null) {
|
|
110
|
+ scrollAnimator = new HideOnScrollAnimator(topBar, HideOnScrollAnimator.HideDirection.Up, topBar.getHeight());
|
|
111
|
+ }
|
|
112
|
+ scrollAnimator.onScrollChanged(direction);
|
106
|
113
|
}
|
107
|
114
|
|
108
|
115
|
@Override
|