🔳 Make StatusBar translucent on Android.

This commit is contained in:
Dylan Vann 2017-04-17 20:24:49 -04:00
parent 7110b8546c
commit 27086af5a0
2 changed files with 4 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import {
Text,
StyleSheet,
ScrollView,
StatusBar,
} from 'react-native'
import Icon from 'react-native-vector-icons/Ionicons'
import FastImage from 'react-native-fast-image'
@ -35,6 +36,7 @@ class FastImageExample extends Component {
style={styles.container}
key={key}
>
<StatusBar translucent barStyle="dark-content" backgroundColor="transparent" />
<ScrollView
style={styles.scrollContainer}
contentContainerStyle={styles.scrollContentContainer}

View File

@ -5,6 +5,7 @@ import {
View,
FlatList,
Platform,
StatusBar,
} from 'react-native'
const getImageUrl = (id, width, height) => `https://unsplash.it/${width}/${height}?image=${id}`
@ -78,7 +79,7 @@ class ImageGrid extends Component {
}
const MARGIN = 2
const STATUS_BAR_HEIGHT = Platform.OS === 'ios' ? 20 : 0
const STATUS_BAR_HEIGHT = Platform.OS === 'ios' ? 20 : StatusBar.currentHeight
const styles = StyleSheet.create({
statusBarUnderlay: {