【问题标题】:In react-native TextInput box show a line, how to removed it在 react-native TextInput 框中显示一行,如何删除它
【发布时间】:2017-11-09 17:18:11
【问题描述】:

我的 React-native APP 我制作了一个输入框,但我在输入框中得到了一行...我该如何删除它?

<View style={styles.inputContainer}>
  <TextInput style={styles.input} onChangeText={(text) => this.setState({editTodoVal: text})} value={this.state.editTodoVal}/>
</View>

风格:

inputContainer: {
        marginTop: 5,
        padding: 10,
        flexDirection: 'row'
    },
 input: {
        height: 40,
        padding: 4,
        marginRight: 5,
        flex: 6,
        fontSize: 18,
        borderWidth: 1,
        borderColor: '#fff',
        backgroundColor: '#fff',
        borderRadius: 1,
        color: '#000',
    },

请查看我的图片以获取更多降神信息:

【问题讨论】:

    标签: reactjs react-native textinput


    【解决方案1】:

    默认情况下它带有下划线,如果您需要删除,请使用:underlineColorAndroid='transparent'。另请查看documentation 了解更多信息。

    【讨论】:

    • @jigar_shah 谢谢它的工作,但是 IOS 呢。
    • 我认为IOS不会有任何问题。
    猜你喜欢
    • 2021-05-29
    • 2020-11-23
    • 2019-01-10
    • 2022-12-23
    • 1970-01-01
    • 2019-02-03
    • 2018-11-08
    • 2017-12-28
    • 2021-06-15
    相关资源
    最近更新 更多