【问题标题】:React Native keyboard (multiline)React Native 键盘(多行)
【发布时间】:2018-08-20 19:14:10
【问题描述】:

我的问题是在进行多行文本输入时出现的键盘类型。

<TextInput
   keyboardType="default"
   multiline={false}
   editable={true}
   onChangeText={(text) => this.updateSharedObject({note: text})}
   value={this.state.data.note}
   placeholder="Press to type..."
   placeholderTextColor="#c0c0c0"
   underlineColorAndroid="transparent"
   autoCapitalize="sentences"
   style={[styles.textArea, {height: this.state.height}]}
   onContentSizeChange={(e) => 
   this.updateSize(e.nativeEvent.contentSize.height)}
 />

当用户尝试在字段中输入时,他们会得到这种键盘。

问题是我需要将该字段设为多行字段。当我将它设置为 true 时,键盘变成了这个。

在保持多行的同时保留第一个键盘布局吗?我四处寻找,但没有找到任何帮助。

【问题讨论】:

    标签: android react-native


    【解决方案1】:
    <TextInput returnKeyType='done' />
    

    【讨论】:

    • 是的,我最终弄明白了。不过谢谢!
    猜你喜欢
    • 2018-06-21
    • 2016-12-23
    • 2015-12-28
    • 2020-02-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-29
    • 1970-01-01
    相关资源
    最近更新 更多