Commit 760ce0c9e076b31973d43d98ea099f59c6a99685
dx: fix Central bottom tabs on iOS
Andre Staltz committed on 2/4/2020, 1:06:21 PMParent: 70352bc9550436f3d4a20bfe52d1f2cff6843546
Files changed
src/frontend/screens/central/styles.ts | changed |
src/frontend/screens/central/view.ts | changed |
src/frontend/screens/central/styles.ts | ||
---|---|---|
@@ -6,14 +6,15 @@ | ||
6 | 6 | |
7 | 7 | import {StyleSheet, ViewStyle} from 'react-native'; |
8 | 8 | import {Palette} from '../../global-styles/palette'; |
9 | 9 | import {Dimensions} from '../../global-styles/dimens'; |
10 | +import {getStatusBarHeight} from 'react-native-status-bar-height'; | |
10 | 11 | |
11 | 12 | const page: ViewStyle = { |
12 | 13 | position: 'absolute', |
13 | 14 | top: 0, |
14 | 15 | left: 0, |
15 | - bottom: Dimensions.toolbarHeight, | |
16 | + bottom: Dimensions.toolbarHeight - getStatusBarHeight(true), | |
16 | 17 | right: 0, |
17 | 18 | backgroundColor: Palette.backgroundVoid, |
18 | 19 | justifyContent: 'center', |
19 | 20 | alignItems: 'center', |
@@ -34,9 +35,9 @@ | ||
34 | 35 | position: 'absolute', |
35 | 36 | left: 0, |
36 | 37 | bottom: 0, |
37 | 38 | right: 0, |
38 | - height: Dimensions.toolbarHeight, | |
39 | + height: Dimensions.toolbarHeight - getStatusBarHeight(true), | |
39 | 40 | borderTopColor: Palette.textLine, |
40 | 41 | borderTopWidth: StyleSheet.hairlineWidth, |
41 | 42 | backgroundColor: Palette.backgroundText, |
42 | 43 | flexDirection: 'row', |
src/frontend/screens/central/view.ts | ||
---|---|---|
@@ -37,8 +37,9 @@ | ||
37 | 37 | Touchable, |
38 | 38 | { |
39 | 39 | ...touchableProps, |
40 | 40 | sel: 'public-tab-button', |
41 | + style: styles.tabButton, // iOS needs this | |
41 | 42 | accessible: true, |
42 | 43 | accessibilityLabel: 'Public Tab Button', |
43 | 44 | }, |
44 | 45 | [ |
@@ -72,8 +73,9 @@ | ||
72 | 73 | Touchable, |
73 | 74 | { |
74 | 75 | ...touchableProps, |
75 | 76 | sel: 'private-tab-button', |
77 | + style: styles.tabButton, // iOS needs this | |
76 | 78 | accessible: true, |
77 | 79 | accessibilityLabel: 'Private Tab Button', |
78 | 80 | }, |
79 | 81 | [ |
@@ -105,8 +107,9 @@ | ||
105 | 107 | Touchable, |
106 | 108 | { |
107 | 109 | ...touchableProps, |
108 | 110 | sel: 'connections-tab-button', |
111 | + style: styles.tabButton, // iOS needs this | |
109 | 112 | accessible: true, |
110 | 113 | accessibilityLabel: 'Connections Tab Button', |
111 | 114 | }, |
112 | 115 | [ |
Built with git-ssb-web