android - React Native 键盘(多行)
问题描述
我的问题是进行多行文本输入时出现的键盘类型。
<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 时,键盘变成了这个。
无论如何保持第一个键盘布局,同时仍然使它成为多行?我一直在四处寻找,但没有找到任何帮助。
解决方案
<TextInput returnKeyType='done' />
推荐阅读
- python - python请求超时不超时
- java - 通过 BigDecimal 转换为浮点的适当比例
- xamarin - Xamarin Forms Searchbar iOS 13 忽略背景颜色
- selenium - “数据;” 使用 Selenium 时使用 Chrome 打开
- r - 从 SQLlite 数据库中读取许多表并在 R 中组合
- android - SSLHandshakeException SSL 握手中止
- angular-material - 使用 CDK 拖放时 Angular Mat-List-Option 布局更改
- haskell - 解决“'cycleNext' 的方程有不同数量的参数”
- c - 如何将最大的数字推到数组的后面
- javascript - React - 映射数组未将道具正确传递给子组件