Full Screen Image in React Native
1 min readDec 29, 2016
We have an Image
nested in a View
, I did something like following
container: {
flexGrow: 1,
},
backgroundImage: {
flexGrow: 1,
alignSelf: 'stretch',
},
I thought it would work, but it didn’t. BTW the version I’m working on is 0.39.x.
After googled and struggled for days, I finally realize you have to set width/height to null.
background: {
flexGrow: 1,
margin: 0,
},
backgroundImage: {
flexGrow: 1,
alignSelf: 'stretch',
width: null,
height: null,
},
Not intuitive….