I am new with react native and I wanted to use ImageBackground.
However, when I try to make it display in full screen using the following code:
import React from 'react';
import { StyleSheet, ImageBackground,Text, View } from 'react-native';
const Signin = () => {
return (
<ImageBackground source={require('./images/background.jpg')} style={styles.image}>
<Text>Hello</Text>
</ImageBackground>
)
}
const styles = StyleSheet.create({
image: {
flex: 1,
width: '100%',
height: '100%',
resizeMode:'cover'
}
});
export default Signin;
it returns only half of my screen the picture. Any ideas on why it is doing so?
My initial image properties are the follwing:
My initial image can be found here: https://unsplash.com/photos/0AwoTNSdwV