有人知道如何用自定义字体(内容和占位符)修复TextInput的垂直连接吗?我试过所有这些:
毫无办法!有什么建议吗?

<TextInput
ref={ref => this.emailField = ref}
placeholder="E-Mail"
style={styles.loginInput}
placeholderStyle={styles.loginInput}
editable={true}
maxLength={40}
autoCorrect={false}
selectionColor="#9D9D9D"
placeholderTextColor="#9D9D9D"
autoCapitalize="none"
keyboardType="email-address"
returnKeyType="next"
keyboardAppearance="dark"
textAlign="center"
underlineColorAndroid="transparent"
onSubmitEditing={() => this.passwordField.focus()}
value={this.state.email}
onChangeText={(text) => this.setState({ email: text })}
/>
loginInput: {
width: '70%',
height: 40,
marginBottom: 8,
backgroundColor: '#dbdbdb',
fontFamily: 'Neuzeit Grotesk Regular',
fontSize: 18,
justifyContent: 'center',
alignItems: 'center',
textAlign: 'center',
textAlignVertical: 'center',
},发布于 2019-08-22 08:03:25
我也有同样的问题。在我的例子中,TextInput有一个默认的填充。我将paddingTop: 0、paddingBottom: 0添加到TextInput样式中。
发布于 2019-08-22 08:09:49
请尝试删除marginBottom
https://stackoverflow.com/questions/50064386
复制相似问题