🔳 Make StatusBar translucent on Android.
This commit is contained in:
parent
7110b8546c
commit
27086af5a0
|
@ -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}
|
||||
|
|
|
@ -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: {
|
||||
|
|
Loading…
Reference in New Issue