I am newbie at react-native.
What I want to do is that fit an image in device and keep the ratio of image. Simply I want to make width : 100%
I searched how to make it and seems resizeMode = 'contain'
is good for that.
However, since I used resizeMode = 'contain'
, the image keeps the position vertically centered which I don't want.
I want it to be vertically top.
I tried to use a plug-in such as react-native-fit-image but no luck.
And I found the reason why the image is not sizing automatically. But still I have no idea how to make it.
So, my question is what is the best way to deal with this situation?
Do I have to manually put width, height
size each images?
I want :
- Keep image's ratio.
- Vertically top positioned.
React native test code :
https://snack.expo.io/ry3_W53rW
Eventually what I want to make :
https://jsfiddle.net/hadeath03/mb43awLr/
Thanks.