How can I add a background image in react native so that it takes the whole height of the screen but only part of the width?

Viewed 63

I have tried using the ImageBackground element with different resize options, but I was not able to achieve the required result. I want to make it look like the image on the right. Disclaimer: I am new to React Native so there might be sth that I have missed..

Here is the image:

enter image description here

1 Answers

You can try something like that:

<ImageBackground resizeMode='stretch' style={{ flex:1 }} source={image} imageStyle={{ marginLeft: '50%'}}>
Related