2
我有了這片反應天然視圖:的TextInput邊界和寬度的陣營天然視圖內
<View style={styles.section}>
<Text style={styles.h2}>
NAME
</Text>
<TextInput style={styles.input} placeholder="Name" />
<Text style={styles.h2}>
EMAIL
</Text>
<TextInput style={styles.input} placeholder="Password" />
</View>
input: {
height: 30,
flex: 0.7,
fontSize: 13,
padding: 4,
borderBottomColor: '#fff',
borderRightColor: 'transparent',
borderLeftColor: 'transparent',
borderTopColor: 'transparent',
borderTopWidth: 0,
borderBottomWidth: 0.5,
},
不幸的是,這表明沒有邊界(而不是所期望的下劃線邊界),和兩個輸入盒子佔用全屏(而不是我想要的0.7折)。我該如何解決?
,享有包裝textinputs和分配輸入方式(除fontSize的)給他們 –