这是我想要做的代码
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>
);
}
这是样式表
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"
}});
但是我得到了这样的结果
谁能帮助我我应该怎么做才能使我的文本框呈现为第一张图片?非常感谢