|
@@ -9,6 +9,7 @@ import com.reactnativenavigation.params.StyleParams;
|
9
|
9
|
import com.reactnativenavigation.params.TitleBarButtonParams;
|
10
|
10
|
import com.reactnativenavigation.params.TitleBarLeftButtonParams;
|
11
|
11
|
import com.reactnativenavigation.utils.Task;
|
|
12
|
+import com.reactnativenavigation.utils.ViewUtils;
|
12
|
13
|
import com.reactnativenavigation.views.TitleBarBackButtonListener;
|
13
|
14
|
|
14
|
15
|
import java.util.List;
|
|
@@ -22,6 +23,7 @@ public class ScreenStack extends FrameLayout {
|
22
|
23
|
private final AppCompatActivity activity;
|
23
|
24
|
private TitleBarBackButtonListener titleBarBackButtonListener;
|
24
|
25
|
private Stack<Screen> stack = new Stack<>();
|
|
26
|
+ private final int bottomTabsHeight;
|
25
|
27
|
|
26
|
28
|
public ScreenStack(AppCompatActivity activity,
|
27
|
29
|
ScreenParams initialScreenParams,
|
|
@@ -29,6 +31,7 @@ public class ScreenStack extends FrameLayout {
|
29
|
31
|
super(activity);
|
30
|
32
|
this.activity = activity;
|
31
|
33
|
this.titleBarBackButtonListener = titleBarBackButtonListener;
|
|
34
|
+ bottomTabsHeight = (int) ViewUtils.convertDpToPixel(56);
|
32
|
35
|
pushInitialScreen(initialScreenParams);
|
33
|
36
|
}
|
34
|
37
|
|
|
@@ -52,7 +55,11 @@ public class ScreenStack extends FrameLayout {
|
52
|
55
|
|
53
|
56
|
private void addScreen(Screen screen) {
|
54
|
57
|
screen.setVisibility(INVISIBLE);
|
55
|
|
- addView(screen, new FrameLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT));
|
|
58
|
+ LayoutParams params = new LayoutParams(MATCH_PARENT, MATCH_PARENT);
|
|
59
|
+ if (screen.screenParams.styleParams.drawScreenAboveBottomTabs) {
|
|
60
|
+ params.setMargins(0, 0, 0, bottomTabsHeight);
|
|
61
|
+ }
|
|
62
|
+ addView(screen, params);
|
56
|
63
|
stack.push(screen);
|
57
|
64
|
}
|
58
|
65
|
|