I am trying to layouting my textbox like this
And here is my code that I am trying to do
render() {
return (
<View style={styles.container}>
<View style={styles.row}>
<Headline style={styles.headlineText}>Adresse</Headline>
</View>
<View style={styles.row}>
<Input style={styles.text}
placeholder="Strasse"
/>
<Input style={styles.text}
placeholder="Nr"
/>
</View>
<View style={styles.row}>
<Input style={styles.text}
placeholder="PLZ"
/>
<Input style={styles.text}
placeholder="Stadt"
/>
</View>
<View style={styles.row}>
<Button
onPress={() => this.props.navigation.navigate('PaymentInfo', { name: 'PaymentInfo' })}
title="Weiter"
style={styles.button}
/>
</View>
</View>
);
}
and here is the stylesheet
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'flex-start',
justifyContent: 'flex-start',
backgroundColor: Colors.white,
paddingBottom: normalize(20),
},
row: {
flexDirection: 'row',
alignItems: 'stretch',
justifyContent: 'flex-start',
paddingHorizontal: normalize(20)
},
button: {
marginTop: 20
},
text: {
marginTop: 10
},
headlineText: {
marginTop: normalize(30),
marginBottom: 10,
color: "black"
}});
However I got result like this
Can anyone help me what should I do in order to make my textbox rendered as first image? Many thanks
This is my approach for your solution using
flexbox
to you can try with this link in repl.it an see the result with expo application on your device repl.itHere i paste my code or you can try with link that i gave
This For View
This for style