Skip to content
This repository was archived by the owner on Nov 12, 2019. It is now read-only.

Commit 293a0b0

Browse files
committed
Correct android status bar height on android pre-lollipop
Due to this change facebook/react-native#6481, no more `SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN` so our custom status view won’t be under the system status any more. The quick fix is just set height of our custom view to `0` on Android Pre-Lollipop
1 parent 2e0e2f8 commit 293a0b0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

styles.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
/* @flow */
22
import {
33
StyleSheet,
4+
Platform
45
} from 'react-native'
56

67
const IOS_NAV_BAR_HEIGHT = 44
78
const IOS_STATUS_BAR_HEIGHT = 20
89
const ANDROID_NAV_BAR_HEIGHT = 56
9-
const ANDROID_STATUS_BAR_HEIGHT = 24
10+
let ANDROID_STATUS_BAR_HEIGHT = 24
11+
if (Platform.Version < 21) {
12+
ANDROID_STATUS_BAR_HEIGHT = 0
13+
}
14+
1015

1116
export default StyleSheet.create({
1217
navBarContainer: {},

0 commit comments

Comments
 (0)