How to arrange 2 Image-Components next to another in the same row with flex?
Like this:
|| (image 1) || (image 2) ||
To center a component horizontally and vertically in React. js, set its display property to flex and its alignItems and justifyContent properties to center . The components's content will be horizontally and vertically centered.
Wrap both of your components inside the <SafeAreaView/> component which React Native provides. The BottomContainer wraps the content of the scroll view. I have assigned the Image Height to 450px. This can vary depending upon the design and screen dimensions.
How do I show text in center in React Native? To make text align center horizontally, apply this Property (textAlign:”center”) . Now to make the text align vertically, first check direction of flex. To Make text align center apply same property ( textAlign:”center” ).
flexDirection: 'row'
is your friend
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With